Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unix File System How Unix organizes files and how you can find them.

Similar presentations


Presentation on theme: "Unix File System How Unix organizes files and how you can find them."— Presentation transcript:

1 Unix File System How Unix organizes files and how you can find them.

2 2 Unix file system zHome directory yWhere your files live. yYou always go there when you log in. zWorking directory yWhatever directory you are currently in.

3 Typical Unix file system root (/) bindevetctmpusrvarusers classescsfacstfacstaffspool mailugradmsphd jimd cs290 001 (all people in this class) (all users’ mail)

4 Typical Directories zbin: Software for the shell and most common Unix commands. zdev: Short for devices, holds the software necessary to operate peripherals such as printers and terminals. zetc: Contains various administrative files such as lists of user names and passwords. zusr/users: Contains the home directories of users. ztmp: A directory used to hold temporary files. zvar: Files that contain information that varies frequently; most commonly, mail directories.

5 File and Directory Names zValid names can be made up of: yUppercase letters (A to Z) yLower case letters (a to z) yNumbers (0 to 9) yperiod (.), underscore (_), commas (,). zShould not contain spaces or the following: y& * \ | [ ] { } $ ( ) # ? ‘ “ / ; ^ ! ~ % yYou should also avoid naming files or directories with Unix commands.

6 Absolute Pathnames zTo use a file in Unix, all you need is its name. zTo access a file in another directory, you need to know its pathname. zA pathname is an address that shows the file’s position in the file system. zAbsolute path names give a files location in relation to the top of the file system structure. zAll absolute path names begin with a /. zAlso called full path names. zUse the ~ as a shortcut for the full path to a home directory.

7 Example Directory Structure root (/) binetcvartmp continentsoceans Bats marsupials bandicoot kangaroowombat dev homeusr jack jill opossum wombat

8 Absolute Pathnames zAll absolute path names begin with a /. zAlso called full path names. zUse the ~ as a shortcut for the full path to a home directory.

9 Relative path names zUsually you are interested in a files location relative to where you currently are in the system. zA relative pathnames start at the working directory rather than the root. zUse the.. to refer to the parent of the current directory.

10 Example Directory Structure root (/) binetcvartmp continentsoceans Bats marsupials bandicoot kangaroowombat dev homeusr jack jill opossum wombat

11 Reading zChapter 6.1 – 6.5 zManipulating Files and DirectoriesManipulating Files and Directories


Download ppt "Unix File System How Unix organizes files and how you can find them."

Similar presentations


Ads by Google