Download presentation
Presentation is loading. Please wait.
Published byBartholomew Waters Modified over 9 years ago
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 …
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? 1.* - matches any number of characters, including none 2.? - matches one and only one character 3.[] - 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 *
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.