Computer Science :: All Aptitude Test ::

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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