GAT Subject :: All Aptitude Test ::

Hassan
1.Which command is used to count just the number of characters in a file?
A. wc - 1
B. wc -c
C. wc -w
D. wc - 1

2.Which of the following commands is used to list contents of directories?
A. ls
B. lp
C. dir
D. ls

3.Which command is used to display a file contents in octal form?
A. cd
B. od
C. of
D. cd

4.Which command will be used with vi editor to insert text to left of cursor?
A. s
B. S
C. a
D. s

5.In vi editor, forward search is performed using the command.
A. :pat
B. ?pat
C. /pat
D. :pat

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

7.Which option will be used with ps command to show the entire command line of the process being run?
A. -4
B. -f
C. -1
D. -4

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

9.Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it
A. -r
B. -x
C. -i
D. -r

10.Which of the following directories contain all the Alias created by a user, including his login directory?
A. /tmp
B. /etc
C. /usr
D. /tmp

11.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 -1

12.The % key allows you
A. to move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace.
B. to move the cursor to the upperleft corner of the screen
C. to move the cursor backward to the beginning of a word
D. to move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace.

13.Which command is used to display the characteristics of a process?
A. pid
B. du
C. ps
D. pid

14.Which of the following commands is used to identify the type of file by context?
A. ls
B. cat
C. file
D. ls

15.The field separator in cut command is specified with
A. -a option
B. -d option
C. -r option
D. -a option

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

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

18.Which command is used 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 -R a+x progs

19.Which command is used to display and create files?
A. cat
B. vi
C. ed
D. cat

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

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

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

23.While working with mail command, which command is used to save mail in a separate file?
A. s
B. r
C. w
D. s

24.The command used to compare the files is known as
A. comp
B. cmp
C. do
D. comp

25.Which command is used to terminate a process?
A. shutdown
B. haltsys
C. cancel
D. shutdown

26.Which option will be used with sort command to start sorting ofter the nth column of the (m+l)th field?
A. -m.n
B. +m.n
C. + n.m+1
D. -m.n

27.The cp command uses:
A. standard input file
B. standard output file
C. both input and output file
D. standard input file

28.Which of the following files contains information related to password aging?
A. Shadow
B. password
C. profile
D. Shadow

29.Which command will be used with vi editor to replace text from cursor to right?
A. r
B. R
C. s
D. r

30.Which of the following commands is used to rename a file?
A. rename
B. remove
C. mv
D. rename


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