Q. 1.
Which vi command should one use to delete the first 10 lines of a file in
Normal mode?
gg10dd
10ggdd
10dw
10ddl
Advertisement
Show Answer
gg10dd
Q. 2. Which vi command should one use to quit vi without saving any changes
made?
:q
:q!
:quit
u
Advertisement
Show Answer
:q!
Q. 3. When in Normal mode of vi, which command would you use to search
for a word in a file?
s
/
i
Esc
Advertisement
Show Answer
Q. 4. / command is used to search text in the ______ in Vi editor
forward direction
backward direction
any direction
reversed direction
Advertisement
Show Answer
forward direction
Q. 5. If I want auto indentation to be turned on every time I launch vi, then
which file would I have to edit?
.vimrc
.indent
.bashrc
.viminfo
Advertisement
Show Answer
.vimrc
Q. 6. Which file is used to store configuration settings of Vi editor
.vimrc
.indent
.bashrc
.viminfo
Advertisement
Show Answer
.vimrc
Q. 7. Which of these is not a vi feature?
autosave
autoindent
autoread
autoclose
Advertisement
Show Answer
autoclose
Q. 8. Which vi command should one use to delete 5 characters starting from
the current position of the cursor?
5x
xxxx
dd
5dd
Advertisement
Show Answer
5x
Q. 9. Which of the following is not a file attribute in Unix?
file location
file size
creation time
file owner
Advertisement
Show Answer
file location
Q. 10. What does the first character in the output of command “ls -l”
represent?
Owner Read access
File Permission
File Type
None of the options
Advertisement
Show Answer
File Type
Q. 11. Which unix command is used to find out the total size of a partition on
disk?
du
df
ls
cat
Show Answer
df
Q. 12. Which command can I use to find out the mount points of a partition of
my disk?
man
du
ls
df
Show Answer
df
Q. 13. Which of the following is not a mode for tar
list
create
compress
extract
Advertisement
Show Answer
compress
Q. 14. Which directory in UNIX usually stores the configuration files?
/bin
/conf
/etc
/home
Advertisement
Show Answer
/etc
Q. 15. Which option of ls sorts the files according to their size?
ls -s
ls -S
ls -t
ls -h
Advertisement
Show Answer
ls -S
Q. 16. Which command would you use to replicate a complete directory
structure from one location to another?
mv -r
cp
mv
cp -r
Advertisement
Show Answer
cp -r
Q. 17. Which of the following Unix command is used to create an empty file?
ls
touch
chown
du
Show Answer
touch
Advertisement
Q. 18. The first character in the output of a ls -l command for a file is “c”
represent?
It is a copied file
It is a created file
It is a character file
It is a class file
Advertisement
Show Answer
It is a character file
Q. 19. Which command can I use to modify the timestamp of a file?
touch
chmod
chtime
chown
Show Answer
touch
Q. 20. Which of the following commands cannot be used to view the contents
of a file?
ls
cat
vi
emacs
Advertisement
Show Answer
ls
Q. 21. Which of the following commands is used to list the contents of a
directory ?
ls
listdir
mkdir
v
dirls
Advertisement
Show Answer
ls
Q. 22. Which command can I used to change the owner and also the group of
a file?
chgrp
chown
chmod
umask
Advertisement
Show Answer
chown
Q. 23. Which command is used to delete an empty directory?
deldir
del
rm
rmdir
Show Answer
rmdir
Q. 24. Which file attribute is not stored in an inode?
file size
file name
file permissions
file owner
Advertisement
Show Answer
file name
Q. 25. Which of the following is represented as a file on UNIX
directory
All of these
Feedback:
printer
Shell script
Advertisement
Show Answer
All of these
Q. 26. Which of these is an invalid argument to cd command
Absolute file path
–
Directory
../../../
Show Answer
Absolute file path
Advertisement
Q. 27. cd command only accepts _____ as arguments
path
repository
Directories
file
Advertisement
Show Answer
directories
Q. 28. Which command is used to set the default permissions of a newly
created file on UNIX?
.bashrc
chown
chmod
umask
Advertisement
Show Answer
umask
Q. 29. Which UNIX command is used to convert a file to a read only file
readonly
chown
chmod
vi
Advertisement
Show Answer
chmod
Q. 30. ___ used to change the permissions of a file on UNIX
chrun
chown
chmod
vi
Advertisement
Show Answer
chmod
Q. 31. Which command need to give write permissions to a file [Link] to
all the users belong to particular group ?
chmod a+w [Link]
chmod g+w [Link]
chmod u+w [Link]
chmod u+gw [Link]
Show Answer
chmod g+w [Link]
Q. 32. What is the octal representation of the file owner’s mode : rw-
5
6
42
420
Show Answer
6
Advertisement
Q. 33. Read permissions is represented in octal system as
2
6
4
420
Show Answer
Q. 34. write permission is represented as _____ in octal system
5
6
2
4
Advertisement
Show Answer
Q. 35. What is the default file permissions for a system with umask : 471
206
undefined
376
306
Advertisement
Show Answer
306
Q. 36. Which is the best place to install your program executable files?
bin directory
lib directory
etc directory
tmp directory
Advertisement
Show Answer
bin directory
Q. 37. What is the main purpose of an Operating System?
Connect me to internet
Install software
Interact with the user
Manage all system resources
Show Answer
Manage all system resources
Q. 38. UNIX provides multi-tasking by
Parallel processing
Time sharing
multiple processors
multi users
Advertisement
Show Answer
Time sharing
Q. 39. What is the architecture model of UNIX operating system
Modular
Monolithic
Heuristic
Simple
Show Answer
Modular
Q. 40. Which of these is not a feature of UNIX
Consistency
Security
Simplicity
Multi-user
Show Answer
Consistency, Simplicity
Advertisement
Q. 41. Which of the following are variants of UNIX?
System V
BSD
both of the above
Fedora
Ubuntu
Show Answer
both of the above
Advertisement
Q. 42. Which subsystem of UNIX kernel makes hardware usable?
Process Management
Virtual File System
Memory Management
Device Drivers
Show Answer
Device Drivers
Q. 43. _____ vi command moves the cursor to the first line of the file.
dd
first
1dd
gg
Advertisement
Show Answer
gg