Shared Flashcard Set

Details

Ch 7 Files and File System Structure
Unix The Textbook 2nd Edition
75
Computer Science
Undergraduate 2
09/24/2014

Additional Computer Science Flashcards

 


 

Cards

Term
What seven types of files does UNIX support?
Definition
simple/ordinary files, directory, symbolic(soft link), block special files, character special files, named pipe (FIFO), and socket
Term
Every file is a considered by UNIX to be what?
Definition
A sequence of bytes
Term
An index value for an array on the disc which is 4 bytes long
Definition
inode number
Term
Created by the system when a symbolic link is created to an existing file
Definition
link file
Term
This type of file corresponds to devices such as keyboards
Definition
character special file
Term
This type of file corresponds to devices such as disk
Definition
block special file
Term
Special files are typically placed in the ___ directory.
Definition
/dev
Term
True or False. Application and commands read and write peripheral devices files in the same way that they read and write ordinary files
Definition
True
Term
Input and output in Unix is said to be ____
Definition
device-independent
Term
Various special devices simulate physical physical devices and are therefore known as ___ ____.
Definition
pseudo devices
Term
Tools that enable processes to communicate with each other
Definition
interprocess communication mechanisms
Term
An area in the kernel memory that allows two processes to communicate with each other, provided the processes are running on the same computer system and are related to each other; typically the relationship is parent-child
Definition
pipe
Term
A file that allows two processes to communicate with each other if the process is on the same computer; but the processes to not have to be related to each other
Definition
FIFO file
Term
A ____ can be used by processes on the same computer or on different computer to communicate with each other; the computers can be on a network(intranet) or on the Internet.
Definition
socket
Term
A socket with AF_INET address family is also known as the ___ ___ ___
Definition
Internet domain socket
Term
A socket with address family AF_UNIX can be used for communication between processes that run on the same machine under a UNIX operating system.
Definition
UNIX domain socket
Term
the file system structure starts with one main directory, called the ___ ___
Definition
root directory
Term
When you log on, the UNIX system puts you in a specific directory, called your ___ ___
Definition
home/login directory
Term
The directory that you are currently in
Definition
present working directory
Term
The present working directory is also denoted as
Definition
. (pronounced 'dot')
Term
The parent of the present working directory is denoted ___
Definition
.. (pronounced 'dot dot'
Term
A file or directory in a hierarchical file system is specified by a ____
Definition
pathname
Term
When a pathname is specified starting with the root directory, it is called an ___ ____ because it can be used by any user from anywhere in the file system structure.
Definition
absolute pathname
Term
Pathnames starting with the present working directory or a user's home directory are called ____ ____
Definition
relative pathnames
Term
Pathnames can be specified in what three ways
Definition
1. starting with root directory
2. starting with present working directory
3. starting with the user's home directory.
Term
The ___ ____ is at the top of the file system hierarchy and is denoted as a slash (/)
Definition
root directory
Term
The ___ directory contains binary(executable) images of most UNIX commands
Definition
/bin
Term
The ___ directory contains files corresponding to the devices connected to the computer
Definition
/dev
Term
The ___ directory contains commands and files for system administration.
Definition
/etc
Term
The ___ directory contains a collection of related files for a given language in a single file called an archive.
Definition
/lib
Term
The ___ directory contains all the files not connected to any directory
Definition
/lost+found
Term
The ___ directory contains temporary files.
Definition
/tmp
Term
Normally used to hold the home directory of all the user of the system is the ___ directory.
Definition
/users
Term
The ___ directory contains subdirectories that hold the UNIX utilities, tools, language libraries, and manual pages.
Definition
/usr
Term
the ___ file contains, the /var/spool/mail directory that receives and holds incoming e-mail messages
Definition
/var
Term
The ___ file contains one line for every user on the system and describes that user.
Definition
/etc/passwd
Term
The ___ file contains the binary image of the UNIX kernel to be loaded into memory at system bootup time.
Definition
/unix
Term
You can find the full path-name for your home directory by using the ___ and ___ commands.
Definition
echo, pwd
Term
This command allows you to determine the absolute path of your home directory.
Definition
echo $HOME
Term
You can use this command after logging in to find your home directory
Definition
pwd
Term
Change the present working directory to "directory", or to the home directory if no argument is specified
Definition
cd [directory]
Term
Send the names of the files in the directories and files specified in "pathname-list" to the display screen
Definition
ls [options] [pathname-list]
Term
Display '/' after directories, '*' after binary executables, and '@' after symbolic links
Definition
ls -F
Term
Display names of the files, including hidden files etc.
Definition
ls -a
Term
Display inode number
Definition
ls -i
Term
Display long list that includes access permissions, link count, owner, group, file size (in bytes) and modification time.
Definition
ls -l
Term
create directories specified in 'dirnames'
Definition
makedir [options] dirnames
Term
create a sub-directory with the given access permission
Definition
mkdir -m MODE
Term
create parent directories that don't exist in the pathnames specified in 'dirnames'
Definition
mkdir -P
Term
remove the empty directories specified in 'dirnames'
Definition
rmdir [options] dirnames
Term
Remove empty directories specified in dirnames and empty parent directories as well
Definition
rmdir -P
Term
The first letter of the first field displayed by 'ls -id'
Definition
- ordinary file
b block special file
c character special file
d directory
l link
p named pipe (FIFO)
s socket
Term
The remaining letter of the first field displayed by 'ls -id'
Definition
Access permissions for owner, group and others.
Term
The second field displayed by 'ls -id'
Definition
number of links
Term
The third field displayed by 'ls -id'
Definition
Owner's login name
Term
The fourth field displayed by 'ls -id'
Definition
Owner's group name (can also be a number)
Term
The fifth field displayed by 'ls -id'
Definition
file size in btyes
Term
The sixth, seven, and eighth fields displayed by 'ls -id'
Definition
date and time of last modification
Term
The ninth field displayed by 'ls -id'
Definition
file name
Term
display the inode numbers and names of all the files in your current working directory that have four-character names and an .html extension. The file names must start with a letter, followed by any two characters, and end with a digit from 1 through 5
Definition
ls i [a-zA-z]??[1-5].html
Term
display the names of all the files in the home directory that do not start with a digit and that end with a .c or .C
Definition
ls ~/[^0-9]*.[c,C]
Term
Attempt to classify files in 'file-list'
Definition
file [options] file-list
Term
every file that is allocated a unique inode from a list of inodes on the disk, called the ___
Definition
i-list
Term
the kernel maintains a table of nodes in the main memory for all open files called the ___ ____
Definition
inode table
Term
A files location on disk is specified by a number of direct and indirect pointers to ___ ___ containing file data
Definition
disk blocks
Term
each drive consist of a platters where each surface is logically divided into concentric circles called ___
Definition
tracks
Term
each track of the surface of a disk platter is subdivided into fixed size portions called ____
Definition
sectors
Term
the address of a sector is a four-dimensional address comprising of ___, ____, ____ and ____
Definition
disk #, cylinder #, track #, sector #
Term
the command reads input from this standard file
Definition
standard input (stdin)
Term
the commands sends its output and error messages to these two standard files
Definition
standard output (stdout) and standard error(stderr) files
Term
the default standard files for input/output can be changed to other files by using the ___ ___
Definition
redirection operators: < for input redirection and > for output and error redirection.
Term
A small integer, called a ___ ___, is associated with every open file in UNIX
Definition
file descriptor.
Term
the kernel use a file descriptor to index the per-process ___ ___ ___ to get a pointer to the system wide file table.
Definition
file descriptor table
Term
the ___ ___, among other things, contains a pointer the the file's inode in the inode table
Definition
file table
Term
Every UNIX file has a ___ ____
Definition
end-of-file marker
Supporting users have an ad free experience!