SlideShare ist ein Scribd-Unternehmen logo
1 von 16
UNIX basics
and
The UNIX file system
--Omkar .G. Walavalkar
Unix System Structure
user
shell and utilities
kernel
hardware
c programs
scripts
ls
ksh
gcc
find
open()
fork()
exec()
What is a shell?
• The user interface to the operating system
• Functionality:
– Execute other programs
– Manage files
– Manage processes
• A program like any other
• Executed when you log on
Most Commonly Used Shells
– /bin/sh The Bourne Shell / POSIX shell
– /bin/csh C shell
– /bin/tcsh Enhanced C Shell
– /bin/ksh Korn shell
– /bin/bash Free ksh clone
Basic form of shell:
while (read command) {
parse command
execute command
}
A simple example
• Execute a basic command
• Parsing into command in arguments is called
splitting
$ ls –l /bin
-rwxr-xr-x 1 root sys 43234 Sep 26 2001 date
$
prompt command arguments
The UNIX File Hierarchy
Organizing of The File System
/ The root directory
/bin or /sbin Commands for basic
system operation
/dev Device entries
/etc Critical startup and
configuration files.
/lib Library for the C
compiler
/tmp Temporary files
/var/adm or
/var/log
Accounting file, log
files
Filenames
/
tmp etc bin
dmr wm4
foo who date
usr
.profile
foo
who
date
.profile
A sequence of characters other than slash.
Case sensitive.
Directory
/
tmp etc bin
dmr wm4
foo who date
usr
.profile
etc
usr
dmr
bin
Holds a set of files or other directories.
Case sensitive.
Pathname
/
tmp etc bin
dmr wm4
foo who date
usr
.profile /usr/wm4/.profile
A sequence of directory names followed by a simple
filename, each separated from the previous one by a /
Files and Directories
• Files are just a sequence of bytes
– No file types (data vs. executable)
– No sections
– Example of UNIX philosophy
• Directories are a list of files and status of the files:
– Creation date
– Attributes
– etc.
Mounting File Systems
Device Mount Point
/
/a/b
a
b
/
a
b
/
a
b
/
a
b
Mount table
root device external device
Common Utilities for Managing files and
directories
• pwd print process working dir
• ed, vi, emacs… create/edit files
• ls list contents of directory
• rm remove file
• mv rename file
• cp copy a file
• touch create an empty file or update
• mkdir and rmdir create and remove dir
• wc counts the words in a file
• file determine file contents
• du directory usage
File Permissions
• UNIX provides a way to protect files based on
users and groups.
• Three types of permissions:
• read, process may read contents of file
• write, process may write contents of file
• execute, process may execute file
• Three sets of permissions:
• permissions for owner
• permissions for group (1 group per file)
• permissions for other
Directory permissions
• Same types and sets of permissions as for
files:
– read: process may a read the directory contents
(i.e., list files)
– write: process may add/remove files in the
directory
– execute: process may open files in directory or
subdirectories
Summary
• All UNIX file system are very similar.
• All file system have this concept of file tree.
– Transparent to user even mount point is
mapped to a remote file system.
• To communicate with devices, special
device files are used.
• More information check out the man pages.

Weitere ähnliche Inhalte

Was ist angesagt?

Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internalsmukul bhardwaj
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Ahmed El-Arabawy
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systemsMarian Marinov
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux Harish R
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in LinuxKnoldus Inc.
 
Linux ppt
Linux pptLinux ppt
Linux pptlincy21
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commandsSagar Kumar
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linuxVeeral Bhateja
 
Linux file system
Linux file systemLinux file system
Linux file systemBurhan Abbasi
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentationSahilGothoskar
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsAhmed El-Arabawy
 

Was ist angesagt? (20)

Linux
Linux Linux
Linux
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Users and groups in Linux
Users and groups in LinuxUsers and groups in Linux
Users and groups in Linux
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Intro to linux
Intro to linuxIntro to linux
Intro to linux
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 
Linux basics
Linux basicsLinux basics
Linux basics
 
User management
User managementUser management
User management
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux
Linux Linux
Linux
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and Permissions
 

Ähnlich wie Linux: Basics OF Linux

Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxRajesh Kumar
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting StartedAngus Li
 
Get Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic KnowledgeGet Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic KnowledgeDavid Clark
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptxPriyadarshini648418
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.pptKiranMantri
 
Linux Basics
Linux BasicsLinux Basics
Linux BasicsLokesh C
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemSadia Bashir
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPriyadarshini648418
 
Linuxnishustud
LinuxnishustudLinuxnishustud
LinuxnishustudVicky Singh
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Tushar B Kute
 
Linux Presentation
Linux PresentationLinux Presentation
Linux PresentationMuhammad Qazi
 
Unix File System
Unix File SystemUnix File System
Unix File Systemstudent(MCA)
 
File handling and permisions.pptx
File handling and permisions.pptxFile handling and permisions.pptx
File handling and permisions.pptxAkampaPhilomena
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
UNIX.pptx
UNIX.pptxUNIX.pptx
UNIX.pptxP S Rani
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.pptNikhil Raut
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to UnixNishant Munjal
 

Ähnlich wie Linux: Basics OF Linux (20)

Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
Linux 4 you
Linux 4 youLinux 4 you
Linux 4 you
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Get Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic KnowledgeGet Started with Linux Management Command line Basic Knowledge
Get Started with Linux Management Command line Basic Knowledge
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 
2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx2. UNIX OS System Architecture easy.pptx
2. UNIX OS System Architecture easy.pptx
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
Lesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File SystemLesson 2 Understanding Linux File System
Lesson 2 Understanding Linux File System
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
Linuxnishustud
LinuxnishustudLinuxnishustud
Linuxnishustud
 
Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
File handling and permisions.pptx
File handling and permisions.pptxFile handling and permisions.pptx
File handling and permisions.pptx
 
Linux Shell Basics
Linux Shell BasicsLinux Shell Basics
Linux Shell Basics
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
UNIX.pptx
UNIX.pptxUNIX.pptx
UNIX.pptx
 
linux-lecture1.ppt
linux-lecture1.pptlinux-lecture1.ppt
linux-lecture1.ppt
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 

KĂźrzlich hochgeladen

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

KĂźrzlich hochgeladen (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Linux: Basics OF Linux

  • 1. UNIX basics and The UNIX file system --Omkar .G. Walavalkar
  • 2. Unix System Structure user shell and utilities kernel hardware c programs scripts ls ksh gcc find open() fork() exec()
  • 3. What is a shell? • The user interface to the operating system • Functionality: – Execute other programs – Manage files – Manage processes • A program like any other • Executed when you log on
  • 4. Most Commonly Used Shells – /bin/sh The Bourne Shell / POSIX shell – /bin/csh C shell – /bin/tcsh Enhanced C Shell – /bin/ksh Korn shell – /bin/bash Free ksh clone Basic form of shell: while (read command) { parse command execute command }
  • 5. A simple example • Execute a basic command • Parsing into command in arguments is called splitting $ ls –l /bin -rwxr-xr-x 1 root sys 43234 Sep 26 2001 date $ prompt command arguments
  • 6. The UNIX File Hierarchy
  • 7. Organizing of The File System / The root directory /bin or /sbin Commands for basic system operation /dev Device entries /etc Critical startup and configuration files. /lib Library for the C compiler /tmp Temporary files /var/adm or /var/log Accounting file, log files
  • 8. Filenames / tmp etc bin dmr wm4 foo who date usr .profile foo who date .profile A sequence of characters other than slash. Case sensitive.
  • 9. Directory / tmp etc bin dmr wm4 foo who date usr .profile etc usr dmr bin Holds a set of files or other directories. Case sensitive.
  • 10. Pathname / tmp etc bin dmr wm4 foo who date usr .profile /usr/wm4/.profile A sequence of directory names followed by a simple filename, each separated from the previous one by a /
  • 11. Files and Directories • Files are just a sequence of bytes – No file types (data vs. executable) – No sections – Example of UNIX philosophy • Directories are a list of files and status of the files: – Creation date – Attributes – etc.
  • 12. Mounting File Systems Device Mount Point / /a/b a b / a b / a b / a b Mount table root device external device
  • 13. Common Utilities for Managing files and directories • pwd print process working dir • ed, vi, emacs… create/edit files • ls list contents of directory • rm remove file • mv rename file • cp copy a file • touch create an empty file or update • mkdir and rmdir create and remove dir • wc counts the words in a file • file determine file contents • du directory usage
  • 14. File Permissions • UNIX provides a way to protect files based on users and groups. • Three types of permissions: • read, process may read contents of file • write, process may write contents of file • execute, process may execute file • Three sets of permissions: • permissions for owner • permissions for group (1 group per file) • permissions for other
  • 15. Directory permissions • Same types and sets of permissions as for files: – read: process may a read the directory contents (i.e., list files) – write: process may add/remove files in the directory – execute: process may open files in directory or subdirectories
  • 16. Summary • All UNIX file system are very similar. • All file system have this concept of file tree. – Transparent to user even mount point is mapped to a remote file system. • To communicate with devices, special device files are used. • More information check out the man pages.