Computer Science :: All Aptitude Test ::

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

23.Which command is used to display the top of the file?
A. cat
B. head
C. more
D. cat

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

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

26.Which command is used to remove a directory?
A. rd
B. rmdir
C. dldir
D. rd

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

28.Which command is used to extract specific columns from the file?
A. cat
B. cut
C. grep
D. cat

29.Which command sends the word count of the file infile to the newfile.
A. wc infile >newfile
B. wc newfile
C. wc infile - newfile
D. wc infile >newfile

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


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