Midterm Questions Flashcards
What would you type at the command line if you wanted to see the value of the variable SHELL?
echo $SHELL
What would you type at the command line if you wanted to see the last 10 lines of the file log.txt?
tail log.txt
What is the name of the directory at the top of the Unix filesystem?
root
What symbol is used to represent the top of the Unix filesystem?
/
What is the parent directory?
the directory directly above your current directory
Can you have two files with the same name in the same directory?
no
What directory are you in when you first log in to a Unix machine?
your own home directory
What does the .. (dot dot) in your current directory mean?
the parent directory of your current directory
What directory is the starting point for an absolute path?
the root directory
What directory is the starting point for a relative path?
the current directory
By default, which account is the owner of a file or directory?
the account that created it
Name the three types of access permissions.
read, write and execute
Name the three categories of accounts which are used in assigning access permissions.
owner, group, everyone else
What does the PATH shell variable contain?
the list of directories the shell must search to find the file to run a command
If you wanted the program do_something to take input from the file data.txt what would you write at the command line?
do_something < data.txt