1 / 14

The Unix File System

The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored?. Filename - stored in directories Inode - stored in an inode table Data – stored in data blocks on the storage media. What Unix command allows us to view the contents of directories?.

jolie
Download Presentation

The Unix File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Unix File System

  2. What are the three parts of every file on a Unix filesystem? And where is each stored? • Filename - stored in directories • Inode - stored in an inode table • Data – stored in data blocks on the storage media

  3. What Unix command allows us to view the contents of directories? • ls

  4. What is kept in a Unix directory in addition to the names of files? What command is used to see this information? • Inode numbers • ls -i

  5. Give four useful options to the ls command. • ls -F - distinguishes directories from ordinary files • ls -l - long listing, includes inode info. • ls -a - shows hidden files as well • ls -d - shows inode info. of a directory

  6. What information about a file is kept in the inode that you can view in a long listing (ls –l)? • Type of file (directory, ordinary, etc.) • File Permissions • Link count • Owner of the file • Group (gid) of the file • Size of the file • Modification date of the file (and other dates) • Pointers to where the data of the file is located

  7. What Unix command prints out your current working directory? What is the name of that directory when you log in? • pwd • Your home directory

  8. What Unix command can change your current working directory? What does this command do if you give it no arguments? • cd • With no arguments, the cd command makes your home directory your current working directory.

  9. What two files are in every Unix directory, and why don’t they normally show up with the ls command? • . and .. (dot - the current directory and dot-dot - the parent directory) • they are hidden files

  10. Give an example of an absolute pathname and a relative pathname. • Absolute pathname: /home/CIS90/guest/letter • Relative to: Home directory: letter The root directory: home/CIS90/guest/letter

  11. What option to the ls command lets you see a long listing of a directory file? • ls -ld

  12. Unix filenames do not normally tell you whether a file is a program, directory, text, data, etc. What Unix command can you use to find a file’s type? • file <filename>…

  13. What are the three special characters used by the shell to collectively access groups of files? What are the pattern matching characteristics of each? • * - matches any number of characters, including none • ? - matches one and only one character • [] - matches any one of the characters contained within the brackets

  14. What are two reasons you may want to use these filename expansion characters? • To access groups of files with common extensions or prefixes • To save typing long file or directory pathnames; you need type only the characters that uniquely specify that file, followed by the *

More Related