Answers to Linux Command quiz 1

Here are the answers to linux command quiz -1

1. Which option with the command rm is required to remove a directory
Ans: "-r"

2. The command used to display the manual pages for any command is
Ans: man

3. Which of following will show the first 5 lines of the input file
Ans: head -5

4. Which option of ls will show the hidden files
Ans: -a

5. The command cat -n file will
Ans: Add line numbers to every line of the output

6. The command echo -n hello will
Ans: Print hello and not add a new line after it

7. The command sort by default sorts
Ans: Text

8. Which of the following will list the users who currently logged in in the system
Ans: who

9. To change the password of a user we can use the command
Ans: passwd

10. Which command can be used to view the content of a file in reverse i.e from last line to first.
Ans: tac

No comments:

Post a Comment

Follow by Email