Computer Science - Unix

Exercise :: Unix - Section 2

21. 

The command to count the number of files in the current directory by using pipes, is

A. ls | wc
B. ls -l | wc -l
C. ls | wc -w
D. ls | ws -c
E. None of the above

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

22. 

Which of the following commands is used to get directory one level up?

A. cd
B. cd ..
C. cd/
D. chdir
E. None of the above

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

23. 

Which of the following commands is used to count the total number of lines, words, and characters contained in a file.

A. count p
B. wc
C. wcount
D. countw
E. None of the above

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

24. 

Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories?

A. rm *
B. rm -r *
C. rm all
D. rm *.*
E. None of the above

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

25. 

Which of the following commands is used to change the working directory?

A. cd
B. changedir
C. chdir
D. cdir
E. None of the above

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.