File Management  «Prev  Next»

Unix File Management - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 
1. Suppose a symbolic link resides in your current directory. Which of the following commands will reveal the actual file to which the link points? Please select the best answer.
  A. ln -s
  B. ls -F
  C. ls -a
  D. ls -l

2. Suppose you decide to remove a directory using the command rm -r directory. Which two statements about this command are true? Please select all the correct answers.
  A. The command works only if the specified directory is empty
  B. The command is more efficient than rmdir
  C. The command prompts you before removing each file in the directory
  D. The command prompts you before removing read-only files that you own

3. Which of the following commands will place a copy of directory1 under directory2? Assume that you have write permission to directory2. Please select the best answer.
  A. cp directory1 directory2
  B. cp -i directory1 directory2
  C. cp -r directory1 directory2
  D. mv directory1 directory2

4. Note the following command: find ../project -type f -name *.htm | page_list
Assuming that page_list is a file, identify the reasons why this command fails.
Please select all the correct answers.
  A. You cannot specify two conditions within the same find command
  B. You need quotes around the *.htm pattern
  C. To save output to page_list, use > or >>, not the | character
  D. The pathname cannot include the .. symbol