Unix 8

Card Set Information

Author:
alishac
ID:
168920
Filename:
Unix 8
Updated:
2012-09-04 16:17:49
Tags:
Unix
Folders:

Description:
Unix FIFO and GREP
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user alishac on FreezingBlue Flashcards. What would you like to do?


  1. The tee command redirects its input to one or more files and standard output.
    True
  2. Named pipes in UNIX are also known as FIFOs.
    True
  3. The ls ~ | wc –l command displays the number of files in your home directory
    including all hidden files.
    False
  4. Standard file descriptors are 1 2 and 3 for standard input standard output and standard
    error respectively.
    False
  5. Standard files in UNIX are by default attached to your terminal (keyboard and display screen) but they can be changed to other files by using I/O and error
    redirection.
    True
  6. When the rsh computer1 sort < datafile command is executed on computer2
    • The sort command executes on computer1
    • The sort command read input from datafile which resides on computer2
    • Output of the sort command is displayed on computer2's screen
  7. The > operator can be used for input redirection and < for output redirection.
    False
  8. The grep "David" < people | sort | lpr –Php1 command
    • in the standard input and the people files in a sorted order containing the string
    • "David"
  9. The cat 1> letter 2> save 0< memo command reads input from the memo file sends output to the letter file and any error messages to the save file.
    True
  10. The cat 0< memo 1> letter 2>&1 command reads input from the memo file sends output to the letter file and any error messages to the display screen.
    False
  11. The cat 0< memo 1> letter 2> save command reads input from the memo file sends output to the letter file and any error messages to the save file.
    False
  12. The cat 0< memo 2>&1 1> letter command reads input from the memo file sends output to the letter file and any error messages to the display screen.
    True
  13. You can use the mkfifo –m 600 ~/myfifo1 command to create the myfifo1 FIFO in your home directory with access permissions on it set to read and write for you and
    users in your group and no permissions for other users.
    False
  14. The cat < /etc/passwd > newfile command can be used to copy data in the /etc/passwd file to newfile.
    True
  15. You can create a FIFO by using the
    • mkfifo command
    • mknod command
    • mknod system call or the C library call mkfifo
  16. The ls –a ~ | tee ls.output | wc –l command displays names of all the files in your current directory and the total number of these files.
    False
  17. The grep "David" < people | sort | tee mydata | wc -l command
    • in the people file in a sorted order containing the string "David"
    • displays the number of such lines and sends error messages to the display screen
  18. In the grep < output_file > input_file command
    grep reads input from output_file
  19. A UNIX pipe can be used to redirect standard output of a command to standard
    input of another command.
    True
  20. The 2> operator can be used for error redirection in Bash.
    True

What would you like to do?

Home > Flashcards > Print Preview