Home > Unix Programming > Quizzes > Unix Basics Practice Test: Handling Ordinary Files
Unix Basics Practice Test: Handling Ordinary Files
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 87% Most missed: “Which option is used with mv command so that the destination file does not get o…”
Quiz questions on cat command, cp command, rm and mv command for deleting and renaming files, comparing files, wc command for counting file data, compressing and archiving files. Ordinary files are the most common type of file in Unix. They contain data that is not associated with any special device or process. Ordinary files can be created, edited, and deleted using standard Unix commands. Here are some of the commands that you can use to manage ordinary files: cat: - Displays the contents of a file. cp: - Copies a file to another location. mv: - Moves or renames a file. rm: - Deletes... Show more
Unix Basics Practice Test: Handling Ordinary Files
Time left 00:00
25 Questions

1. Which option is used for counting the number of lines in a file only.
2. Which command will be used for extracting files from an archive named abc.tar?
3. -f option when used with mv command overwrites existing files without prompting any messages.
4. Which option is used with touch command which forces the command not to create file, if it does not exists.
5. Which option is used for printing multiple copies of a file using lp command?
6. Which command is used for renaming files?
7. What does -i option do?
8. Which option is used with cmp command to limit the number of bytes to be compared?
9. wc command cannot take multiple filenames as arguments.
10. If the destination file does not exists, then mv command creates it.
11. Which of the following is a better agent than gzip?
12. What does the following command do?
$ wc sample.txt > newfile
13. Which option is used with lp command if there are more than one printers in the system?
14. Multiple arguments as filenames can be specified in cat command.
15. Which option is used with gzip command for recursive compression?
16. Which files will be displayed by the following command:
cat *file*
17. What does cat file01 file01 file01 display?
18. Which one of the following commands is incorrect?
19. Which option is used with cp command for linking files instead of copying?
20. Which command is used for counting words, lines and characters in a file?
21. What does the following command do?
cancel prl-320
22. The inode number associated with a file is changed after renaming it.
23. What happens if the destination file specified in cp command does not exist?
24. What if the destination file specified in mv command already exists?
25. Which of the following is an archival program?