UNIX MCQs > FREE SET - 2

1. Which of the following commands is used in Unix to change the working directory?
A cd
B changedir
C chdir
D cdir

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

2. Which is the earliest and most widely used shell that came with the UNIX system?
A C shell
B Korn shell
C Bourne shell
D Smith shell

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

3. Which command is used in Unix to display the end of the file?
A head - r
B tail
C eof
D bof

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

4. Which command is used in Unix to create a directory?
A crdir
B md
C mkdir
D cr

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

5. Which command is used in Unix to display the device name of the terminal you are using?
A who
B ls
C tty
D stty

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

6. Which command is used in Unix to set the three permissions for all the three categories of users of a file?
A chgrp
B chown
C chmod
D chusr

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

7. Which of the following keys is used in Unix to overstrike a whole line?
A R
B v
C C
D u

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

8. Which of the following options is used with vi editor in Unix to ignore case while searching for patterns?
A ic
B ai
C sm
D ts

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

9. Which command is used in Unix to print a file?
A print
B prn
C pg
D lp

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

10. Which command is used in Unix to change directory to the file beginning with a 'p'?
A cd p
B cd p?
C cd p*
D cd [p]

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

11. Which command is used in Unix to list all the files with extension .lst?
A ls -l *.lst
B ls lst*
C ls *.*
D ls *[lst]

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

12. Which of the following is not a filter in Unix?
A cat
B grep
C wc
D None of the above

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

13. Which option will be used in Unix with touch command to change the access time?
A -a
B -b
C -t
D -h

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

14. Which of the following command in Unix addresses all users who are currently hooked on?
A write
B mail
C wall
D mesg

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

15. In Unix vi editor, forward search is performed using the command.
A :pat
B ?pat
C /pat
D All of the above

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

16. Which symbol will be used with grep command in Unix to match the pattern kon at the beginning of a line?
A ^kon
B $kon
C kon$
D kon^

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

17. Which command in Unix sends the word count of the file file1 to the newfile.
A wc file1 >newfile
B wc newfile
C wc file1 - newfile
D wc file1 | newfile

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

18. Which symbol is used in Unix to separate more than one command in the same command line?
A $
B #
C :
D ;

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

19. Which option in Unix will be used with ps command to slow the entire command line of the process being run?
A -4
B -f
C -1
D -2

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

20. Which of the following options will be used in Unix to display number of blocks used by a file?
A -c
B -i
C -d
D -s

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

21. Which column contains all details of the permissions of a file when you issue the ls -l command in Unix?
A second
B fourth
C third
D first

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

22. The cp command in Unix uses:
A standard input file
B standard output file
C both input and output file
D neither standard input nor standard output file

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

23. Which option is used with the chmod command in Unix recursively to all files and sub-directories in a directory?
A -1
B -i
C -x
D -R

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

24. Which command will be used with vi editor in Unix to replace single character under cursor with any number of characters?
A s
B S
C a
D i

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

25. Which of the following commands is used in Unix to display the filenames in multiple columns with indication of directories and executable file?
A ls -F -x
B ls -l
C ls ~ x
D Ip

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

26. Which of the following commands is used in Unix to get directory one level up?
A cd
B cd ..
C cd/
D chdir

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

27. Which of the following commands is used in Unix to view your file 24 lines at a time?
A pg
B cat
C lp
D /p

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

28. If a file in Unix has read and write permissions for the owner, then the octal representation of the permissions will be
A 1
B 6
C 5
D 3

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

29. Which option will be used in Unix with disk free command to include the total amount of disk space in the file system?
A -t
B -tt
C -4
D -i

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

30. The chmod ugo+rw note command in Unix can be represented in octal notation as
A chmod 555 note
B chmod 666 note
C chmod 444 note
D chmod 333 note

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

31. Which of the following files in Unix contains information related to password aging?
A Shadow
B password
C profile
D All the three

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

32. Which of the following commands is used in Unix to display your working directory?
A dir
B prompt $p$g
C pwd
D path

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

33. Which of the following special shell variables is used in Unix to process number of the last background job?
A $!
B $#
C $0
D $*

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

34. Which of the following commands is used in Unix to update access and modification times of a file?
A grep
B wc
C touch
D cat

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

35. The command in Unix which transcribes the standard input to the standard output and also makes a copy of the same in a file is
A tee
B tr
C sort
D grep

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

36. Which command is used in Unix to locate all the .profile files in the system?
A ls profile
B find /-name profile -print
C cd /.profile
D l -u .profile

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

37. The commonly used UNIX commands like date, ls, cat, etc are stored in
A /dev directory
B /bin and /usr/bin directories
C /tmp directory
D /unix directory

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

38. Which commands is used in Unix to assign executable permission to all of the files named "letter"?
A chmod ugo+r letter
B chmod ugo+rw letter
C chmod u+x letter
D chmod ugo+x letter

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

39. Which command is used in Unix to remove a file?
A remove
B rm
C mv
D del

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

40. Which command is used in Unix to sort the lines of data in a file in reverse order
A sort
B sh
C st
D sort -r

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

41. Which of the following directories in Unix contain all the Ales created by a user, including his login directory?
A /tmp
B /etc
C /usr
D /dev

Free MCQs www.sharemcq.com     Answer: Option C
Explanation:
Available Soon.

42. Which of the following commands is used in Unix to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note?
A chmod 761 note
B chmod 671 note
C chmod 167 note
D chmod 4=rwx, g=rw note

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

43. The ls -l command in Unix tells
A who the owner of the file is
B the name of the group owner of the file
C how large the file is and when the file was last modified.
D All of the above

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.

44. Which command is used in Unix to make all files and sub-directories in the directory (progs) executable by all users?
A chmod -R a+x progs
B chmod -R 222 progs
C chmod -1 a+x progs
D chmod -x a+x progs

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

45. Which of the following commands is used in Unix to display the directory attributes rather than its contents?
A ls -l -d
B ls -l
C ls -x
D ls -F

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

46. The Octal number to be given alogn with chmod command in Unix to make a file readable, writable and
executable to the owner, readable and executable to group and others is:
A 000
B 755
C 744
D 555

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

47. Which command is used in Unix to change protection mode of files starting with the string emp and ending with 1,2 or 3 ?
A chmod u+x emp[l-3]
B chmod 777 emp*
C chmod u+r ??? emp
D chmod 222 emp?

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

48. Which of the following keys is used in Unix to replace a single character with new text?
A S
B s
C r
D C

Free MCQs www.sharemcq.com     Answer: Option B
Explanation:
Available Soon.

49. The second set of the three permissions (r-) in Unix indicates that
A group has read permission only
B other has read permission only
C owner has read permission only
D group has write permission only

Free MCQs www.sharemcq.com     Answer: Option A
Explanation:
Available Soon.

50. Which of the following files will displayed by Unix command - cat *ch*
A patch
B catch
C .ch
D All of the above

Free MCQs www.sharemcq.com     Answer: Option D
Explanation:
Available Soon.


No comments:

Post a Comment

Your Feedback is hearty Requested to make the MCQs Collection better.

Popular Posts