Sunteți pe pagina 1din 4

UNIX

1. How can you display a list of all files, including the hidden files?
a) Ls –a
b) Find –a
c) All
d) Find all

2. With what command can you see which folder you are in?
a) whereami
b) place
c) map
d) pwd

3. How do you get all files in a directory with on the 3rd place has an r,g,or i?
a) ls *[rgi]*
b) ls?3[rgi]*
c) ls[..i*]
d) ls**[rgi]?
e) ls??[rgi]*

4. How can you store and append the directory listing (files and directories) in a file
named “filecontent”?
a) ls <>filecontent
b) ls <filecontent
c) ls>>filecontent
d) ls>filecontent

5. How do you delete a file aqaserve.log?


a) touch aqaserve.log
b) dl aqaserve.log
c) rm aqaserve.log
d) less aqaserve.log

6. What do you use to forward errors to a file error.log?

a) 2> error.log
b) 2>/dev/null
c) &>error.log
d) 1>error.log

7. What command do you have to use to go to the parent directory?


a) cd/up
b) cd ~
c) cd –
d) cd ..

8. With what can you stop a process?


a) Kill
b) Delete
c) Shutdown
d) Stop

9. Which command is used to copy all files having the string chap and any two
characters after that to the progs directory?
a) cp chap?? progs
b) cp chap* progs
c) cp chap[12] /progs/*.*
d) cp chap?? /progs/*
e) None of the above

10. Which command sends the word count of the file infile to the newfile.
a) wc infile >newfile
b) wc <infile >newfile
c) wc infile - newfile
d) wc infile | newfile
e) None of the above

11. Which command is used to remove the read permission of the file 'note' from both
the group and others?
a) chmod go+r note
b) chmod go+rw note
c) chmod go-x note
d) chmod go-r, 4-x note
e) None of the above

12. In vi editor, forward search is performed using the command.


a) :pat
b) :pat
c) /pat
d) All of the above
e) None of the above

13: Which of the following commands is used to obtain a list of all files by modification
time?

a) ls -1
b) ls -t
c) ls -i
d) ls -R
e) None of the above

14:Which option will be used with touch command to change the access time?

a) -a
b) -b
c) -t
d) -h
e) None of the above

S-ar putea să vă placă și