JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Unix interview questions part 9
Unix interview questions part 9
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. 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
Show Correct Answer
Correct Answer is :
cp is a command used for copying files and directories
2. 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
Show Correct Answer
Correct Answer is :
destination file will be automatically created
3. Which of the following is not an option of cp command?
A. -z
B. -i
C. -R
D. -u
Show Correct Answer
Correct Answer is :
-z
4. 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
Show Correct Answer
Correct Answer is :
cp file* directory_one
5. 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
Show Correct Answer
Correct Answer is :
using -R option
6. How can we copy a file into our current directory?
A. cp file1
B. cp file1
C. cp file*
D. none of the mentioned
Show Correct Answer
Correct Answer is :
cp file1
7. What does the following command do? cp -u * dir_file
A. copy all files to directory dir_file
B. update all files
C. delete all files
D. update all files in the current working directory and copy newer ones to directory dir_file
Show Correct Answer
Correct Answer is :
update all files in the current working directory and copy newer ones to directory dir_file
8. Sometimes it is not possible to copy a file.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
9. What does -i option do?
A. interactive copying
B. recursively copying
C. updating
D. none of the mentioned
Show Correct Answer
Correct Answer is :
interactive copying
10. To copy multiple files, the last destination file should be a directory.
A. FALSE
B. TRUE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
11. -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
Show Correct Answer
Correct Answer is :
existing file should not be overwritten
12. Which option is used with cp command for linking files instead of copying?
A. -v
B. -l
C. -f
D. -x
Show Correct Answer
Correct Answer is :
-l
13. $ cp -f copies forcefully.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
14. -v option is used with cp command for displaying _____
A. errors
B. informative messages
C. diagnostic messages
D. file contents
Show Correct Answer
Correct Answer is :
informative messages
15. Which command is used for counting words, lines and characters in a file?
A. diff
B. count
C. man
D. wc
Show Correct Answer
Correct Answer is :
wc
16. wc command cannot take multiple filenames as arguments.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
FALSE
17. Which option is used for counting the number of lines in a file only.
A. -l
B. -W
C. -c
D. -w
Show Correct Answer
Correct Answer is :
-l
18. Which option is used for counting the number of words in a file only?
A. -l
B. -W
C. -c
D. -w
Show Correct Answer
Correct Answer is :
-w
19. Which option is used for counting the number of characters in a file only.
A. -l
B. -W
C. -c
D. -w
Show Correct Answer
Correct Answer is :
-c
20. wc command can also work on a data stream.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
Similar Interview Questions
Search for latest jobs
Find Jobs