Os Question Bank Unit-4
Os Question Bank Unit-4
7. How do you view the man page for the `ls` command?
- A) man ls
- B) help ls
- C) ls -man
- D) view ls
Answer: A) man ls
17. Which option can you use with `df` to show the output in human-readable format?
- A) -h
- B) -r
- C) -v
- D) -f
Answer: A) -h
35. How do you search for the word "error" in `logfile.txt` using `grep`?
- A) grep "error" logfile.txt
- B) search "error" logfile.txt
- C) find "error" logfile.txt
- D) locate "error" logfile.txt
Answer: A) grep "error" logfile.txt
42. What type of file is indicated by a `-` at the beginning of the permissions string?
- A) Directory
- B) Regular file
- C) Symbolic link
- D) Special file
Answer: B) Regular file
43. What does a `d` at the beginning of the permissions string indicate?
- A) Directory
- B) Regular file
- C) Special file
- D) Symbolic link
Answer: A) Directory
45. Which option with `rm` will prompt for confirmation before deleting?
- A) -i
- B) -f
- C) -r
- D) -v
Answer: A) -i
82. Which operator connects the output of one command to the input of another?
- A) >
- B) <
- C) |
- D) ;
Answer: C) |