GAT Subject :: All Aptitude Test ::

Hassan
1.Which of the following is not a filter?
A. cat
B. grep
C. wc
D. cat

2.Which of the following commands is used to copy a file wb from the programs directory into a file called wbx in the misc directory?
A. copy programs/wb misc/wbx
B. cp programs/wb misc/wbx
C. tar programs/wb misc/wbx
D. copy programs/wb misc/wbx

3.Which command is used to list all the files with extension .lst?
A. ls -l *.lst
B. ls lst*
C. ls *.*
D. ls -l *.lst

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

5.Which of the following is invalid filename?
A. shutry
B. TRY
C. trial
D. shutry

6.Which commands is used 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+r letter

7.Which set option is used with vi editor to display line numbers on screen?
A. nm
B. nu
C. ic
D. nm

8.Which command is used to print a file?
A. print
B. prn
C. pg
D. print

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

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

11.Which command is used to list out all the hidden files along with the other files?
A. ls -l
B. ls -x
C. ls -F
D. ls -l

12.Which of the following commands is used 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 761 note

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

14.Which of the following commands is used 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. ls -F -x

15.Which command is used with vi editor to search a pattern in the forward direction?
A. /
B. ?
C. //
D. /

16.Which of the following commands is used to assign executable permission to the owner of the file named "note"?
A. chmod g+x note
B. chmod u+w note
C. chmod u+x note
D. chmod g+x note

17.The command to count the number of files in the current directory by using pipes, is
A. ls | wc
B. ls -l | wc -l
C. ls | wc -w
D. ls | wc

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

19.Which of the following commands is used to count the total number of lines, words, and characters contained in a file.
A. count p
B. wc
C. wcount
D. count p

20.Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories?
A. rm *
B. rm -r *
C. rm all
D. rm *

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

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

23.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

24.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

25.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

26.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

27.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

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

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

30.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


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