oDesk Linux Question
1) It checks the aspell command do?
a. If checks the spelling of the file
b. If gives the sequence of lines
c. It is used for redirection
d. It edits the file
Answer: a
2) Which of the following commands can be used to display a long listing of files, with a human-readable file size (like 6.8M instead of 6819467)?
a. ls +ah
b. ls
c. ls -l
d. ls -lh
Answer: d
3) How can you locate the file named password?
a. find -name /etc
b. find / -name passwd
c. find -uid root -gid root -name passwd
d. find passwd
Answer: b
4) What is the output of the following command?
$ man cal > cal.man
a. It will create a new file with the name cal.man
b. The man page of the cal command will be saved to a file named cal.man
c. It will display the man page of calendar
d. None of these
Answer: b
5) What is the purpose of the touch command?
a. It created a new empty file
b. It displays the contents of a file
c. It updates the timestamp of an already existing file
d. It makes a new directory
Answer: a & c
6) How can the version of the Linus kernal be checked?
a. uname -kernal
b. uname -r
c. uname -f
d. kernal -uname
Answer: b
7) The user’s current path is /root/Desktop/abc. if he runs
$ cd ../../../ what will be the user’s current working directory?
a. /
b. /root
c. /root/Desktop
d. /root/Desktop/abc
Answer: a
8) If the umask is 0022, what is the default file permission?
a. 644
b. 655
c. 666
d. 777
Answer: a
9) Who developed Linux?
a. Sabeer Bhatia
b. Bill Gates
c. Linus Torvalds
d. Linux Redhat
Answer: c
10) Why is the wc command used?
a. It is used for sorting
b. It reads the file
c. It counts lines and character from the file
d. It gives the line index
Answer: c
11) Which of the following vi command will discard the changes to the file and exit the vi editor?
a. wq
b. q!
c. w
d. i
Answer: b
12) Which of the following commands will show you a page-wise listing?
a. ls /bin | less
b. ls /bin | more
c. ls /bin | grep
d. None of the above
Answer: a & b
13) What does the head command do?
a. It shows the first 20 lines of a file
b. It shows the first 10 lines of a file
c. It shows the first 50 lines of a file
d. It shows the first 5 lines of a file
Answer: b
14) Which of the following commands lets you search for text in a file without opening the file first?
a. pwd
b. more
c. grep
d. none of the above
Answer: c
15) Which of the following is the parent process in Linux, which further has no parent?
a. init
b. bash
c. .bashrc
d. /etc/init
Answer: a
16) What does the following command do?
# whatis cal
a. It returns a complete description about the cal command
b. It returns a one line description about the cal command
c. It returns the current date
d. None of these
Answer: b
17) Which of the following vi command will exit forcefully from the vi editor without saving changes to the file?
a. wq
b. wq!
c. q!
Answer: c
18) What is the name of the file where groups are added?
a. /etc/grp
b. /etc/groups
c. /etc/group
d. /usr/bin/group
Answer: c
19) Which of the following vi commands will save the file and exit forcefully from the vi editor?
a. wq
b. :wq!
c. q!
d. w!
Answer: b
20) Which of the following is the path that contains documentation about installed packages?
a. /usr/lib/share
b. /usr/lib/
c. /usr/share/doc
d. /usr/share/help
Answer: c