Unix/Linux Command Line and System Administration
Quiz covering Unix/Linux commands, vi editor usage, file operations, system calls, permissions, and printer management
Questions
How can I tell which version of Unix I am using?
- version
- version -a
- uname
- no command
How do I uncompress a file?
- gunzip/expand
- gzip
- zip
- winzip
How do I tar/untar a file?
- tar -cvf file/tar -xvf file
- tar -xvf file /tar -cvf file
- tar -cvf file.tar <file>/tar -xvf file.tar <file>/
- tar -xvf file.tar <file>/tar -cvf file.tar <file>/
How do I remove a file/directory?
- removedir
- rmdir
- rm
- None
How do I change my password and finger information?
- chpasswd
- passwd
- chpass
- password
I know UNIX can multitask -- how do I switch between programs?
- fg,bg, &
- switch
- None
- Both
How do I make all filenames in a directory lowercase?
- for i in *; do mv $i `echo $i | tr [A-Z] [a-z]`; done
- ls | mv $i | tr [A-Z] [a-z];
- ls | for I in do mv $i | tr [A-Z] [a-z]; done
- None
"PWD" stands for
- past working directory
- people working directory
- path working directory
- present working directory
What is VI?
- A application to create Unix boot immages
- Application to create text files
- Application to create animations
- Application to create text file as well as animations
For some file the access permissions are modified to 764. Which of the following
- Every one can read, group can execute only and the owner can read and write
- Every one can read and write, but owner alone can execute
- Every one can read, group including owner can write, owner alone can execute
- None
What is a system call()
- A request by the users to access kernel functions
- A request by kernel to the device
- A request by the device to kernel
- None
vi is the only text editor available in Unix?
- True
- False
vi editor works on
- Append, Insert and copy modes
- Insert Mode, delete mode
- Add mode, delete mode, append mode
- Command, Insert mode, Edit mode
To search a string at the end of the line use
- / <str>*
- /<str>$
- /<str>&
- None
How to convert lower case to upper case or vice versa in vi
- :set upper/lower on
- Use ~
- :/s lower to upper
- None
How to open a file in read only mode using vi
- vi -R <filename>
- vi filename readonly
- vi -r
- Not possible
What is SPOOL?
- A mechanism to connect to printer, keyboard and monitor in Unix
- A mechanism to share printer across users
- A request made by the device to unix kernel
- None
How to query the printer queue?
- Use jobs command
- Use print command
- Use lpq command
- Use lpc command
Only root user can remove the jobs from printer queue
- True
- False
The right sequence shell command substitution & expansion
- {}, ~, $,($)
- {}, $, ~,($)
- {}, ~,$,($)
- None