|
1. The correct unix command to display the contents
of a file is
a) cat
2. Write the command to display the current date in the form dd/mm/yyyy. a) date +%d/%m/%Y,
3. What command is used to copy files and directories? a) copy
4. Which command is used to rename a file? a) ren
5. How do you show lines 5 to 10 of the file {\tt foo}? a) tail +5 foo | head
6. Which one is used to select only one copy of the repeated lines? a) uniq -u
7. The permission -rwxr--r-- represents in octal expression is (IV) a) 777
8. How do you search for blank lines a) grep '^$' files
9. Indicate the right option to search for BOB, Bob, BOb or BoB , a) grep –i Bob files
10. Indicate the right option to search for anything not a letter or number a) grep '^[a-zA-Z0-9]’
11 The command syntax to display the file 'sample.txt' one page at a time is a) man sample.txt>more
12. Which one shows the name of the operating system? a) uname -n
13. How do you remove duplicate lines from the file foo using uniq? a) sort foo|uniq –u
14 Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else? a) chmod 046 textfile
--- Answers: 1) d 2) b 3) b 4) c 5) a 6) a 7) c 8) a 9) b 10) b 11) c 12) a 13) a 14) b |
Read Also
Short Self-Test Questions on Unix Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|