Explore topic-wise MCQs in Unix.

This section includes 19 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

-v option is used with cp command for displaying _____

A. errors
B. informative messages
C. diagnostic messages
D. file contents
Answer» C. diagnostic messages
2.

$ cp -f copies forcefully.

A. True
B. False
Answer» B. False
3.

To copy multiple files, the last destination file should be a directory.

A. False
B. True
Answer» C.
4.

What does -i option do?

A. interactive copying
B. recursively copying
C. updating
D. none of the mentioned
Answer» B. recursively copying
5.

Sometimes it is not possible to copy a file.

A. True
B. False
Answer» B. False
6.

What is the correct syntax for copying multiple files with a filename starting as ‘file’ into another file named as ‘directory_one’?

A. cp -i file directory_one
B. cp -R file directory/directory_one
C. cp file* directory_one
D. none of the mentioned
Answer» D. none of the mentioned
7.

SOMETIMES_IT_IS_NOT_POSSIBLE_TO_COPY_A_FILE.?$

A. True
B. False
Answer» B. False
8.

To copy multiple files, the last destination file should be a directory.$

A. False
B. True
Answer» B. True
9.

What_does_-i_option_do?$

A. interactive copying
B. recursively copying
C. updating
D. none of the mentioned
Answer» C. updating
10.

$ cp -f copies forcefully.

A. True
B. False
Answer» C.
11.

Which option is used with cp command for linking files instead of copying?

A. -v
B. -l
C. -f
D. -x
Answer» B. -l
12.

-n option is used with cp command for what purpose?

A. existing file should not be overwritten
B. to update file
C. interactive copying
D. recursive copying
Answer» C. interactive copying
13.

copy all files to directory dir_fil?

A. update all files
B. delete all files
C. update all files in the current working directory and copy newer ones to directory dir_file
Answer» B. delete all files
14.

How can we copy a file into our current directory?

A. cp file1
B. cp file1
C. cp file*
D. none of the mentioned
Answer» C. cp file*
15.

How can we copy an entire directory under another directory?

A. using -R option
B. using -a option
C. using -u option
D. none of the mentioned
Answer» B. using -a option
16.

What is the correct syntax for copying multiple files with a filename starting as ‘file’ into another file named as ‘directory_one’?$

A. cp -i file directory_one
B. cp -R file directory/directory_one
C. cp file* directory_one
D. none of the mentioned
Answer» D. none of the mentioned
17.

Which of the following is not an option of cp command?

A. -z
B. -i
C. -R
D. -u
Answer» B. -i
18.

What happens if the destination file specified in cp command does not exist?

A. file will not be copied
B. an error will be produced
C. destination file will be automatically created
D. none of the mentioned
Answer» D. none of the mentioned
19.

What is the function of cp command in UNIX?

A. list all the available files in the current directory
B. delete a given file
C. cp is a command used for copying files and directories
D. change the directory
Answer» D. change the directory