Computer Science :: All Aptitude Test ::

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

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

3.In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.
A. .exrc
B. .profile
C. lastlogin
D. .exrc

4.Which command is used to copy the three files wb, collect and mon into the misc directory, under the same, when you were currently in the programs directory?
A. copy wb ../misc collect ../misc mon ../misc
B. cp wb collect mon ../misc
C. copy wb collect mon /misc
D. copy wb ../misc collect ../misc mon ../misc

5.The command chmod 761 note is equivalent to
A. chmod 167 note
B. chmod u=rwx, g=rw, o=x note
C. chmo a =761 note
D. chmod 167 note

6.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. /dev directory

7.Which of the following commands is used to remove files with confirmation prompt from the user file system which have neither been accessed nor modified i the last one year?
A. find -mtime +365 | rm
B. grep (/usr/*) - mtime + 365 | -ok rm
C. find -name - mtime + 365 / - ok rm
D. find -mtime +365 | rm

8.Which of the following commands is used to summarize the disk usage?
A. chkdsk
B. fdisk
C. du
D. chkdsk

9.Which command is used to sort the lines of data in a file in alphabetical order?
A. sort
B. sh
C. st
D. sort

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

11.Which command is used to copy a file wb with the same name from the programs directory to the misc directory?
A. copy programs/wb misc/wb
B. cp programs/wb misc
C. tar programs/wb misc/wb
D. copy programs/wb misc/wb

12.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. C shell

13.The seventh field of /etc/password is
A. password
B. login
C. shell
D. password

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

15.Which command is used to create a directory?
A. crdir
B. md
C. mkdir
D. crdir

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

17.The ls -l command 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. who the owner of the file is

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

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

20.Which of the following commands can be used to get information about yourself?
A. who am i
B. i /4
C. pwd
D. who am i

21.Which of the following commands can be used to get information about all users who are currently logged into the system?
A. which
B. who
C. who am i
D. which

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

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

24.The File that contains a set of instructions which are performed when a user logs in, is
A. .exrc
B. .profile
C. .autoexec
D. .exrc

25.The octal representation 652 indicates
A. Execute permission for the owner
B. Write permission for others
C. Read and write permission of groups
D. Execute permission for the owner

26.Which of the following command is used to count just the number of lines contained in a file?
A. wc -l
B. wc -c
C. wc -w
D. wc -l

27.Which of the following command is used to go to home directory?
A. cd..
B. cd/
C. cd
D. cd..

28.Which command is used to move all files to the bin sub-directory of the parent directory?
A. mv *.* /bin/
B. mv * /bin/*
C. mv * ../bin
D. mv *.* /bin/

29.Which command is used to save the standard output in a file, as well as display it on the terminal?
A. more
B. cat
C. grep
D. more

30.The command that can be used to restrict incoming messages to a user is
A. mesg
B. grep
C. halt
D. mesg


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers