Unix/Linux and Shell Scripting Essentials
Test your knowledge of Unix/Linux system administration, shell scripting, vi editor, file management, process control, and system utilities.
Questions
How many run levels are available in Unix
- 1
- 2
- 5
- 6
What is the purpose of sync command?
- To synchronize user applications
- To synchronize keyboard and monitor
- To synchornize disk buffers
- To syschronize main memory and cache memory
User's with user id as 0 (Zero) are
- Printer users
- Not allowed to login using rlogin/ssh
- root users
- User id cannot be 0
"Count the number of errors in the statement if [password = password1] then echo password else password"
- 0
- 4
- 1
- 2
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>/
I know linux can multitask -- how do I switch between programs?
- fg,bg, &
- switch
- None
- Both
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
To search a string at the end of the line use
- / <str>*
- /<str>$
- /<str>&
- None
What is SPOOL?
- A mechanism to connect to printer, keyboard and monitor in linux
- A mechanism to share printer across users
- A request made by the device to linux kernel
- None
How to sort a file in decending order
- sort -d
- sort
- sort -r
- sort -R
"Which one of the following lines is correctly formatted as the last line of a /etc/printcap file? "
- :mx#2:
- :mx#2
- :mx#2\
- None
"Which of the following describes correctly the function of GhostScript? "
- A free implementation of PostScript
- A printing management tool
- A program for converting files to PostScript
- A free interpreter of PostScript
Which of these commands finds all lines on which the word "Linux" occurs and then deletes them in vi editor
- g:Linux/d
- :g/Linux/d
- g/d/Linux
- Linux/:g/d
"What do you use the rp field in the /etc/printcap file to specify? "
- A remote machine address
- A printer on a remote machine
- A remote printer address
- Both a printer and a remote machine
"Which of the following does the .seq file in the printer spooling directories do? "
- Prevent two jobs being sent to the same printer simultaneously
- Keep track of all the print jobs in the spooling directory
- Assign job numbers to new print jobs
- Record the owners of print jobs
"Who can manipulate the order of print jobs in a print queue? "
- The owner of the job
- The root user
- Anyone
- Anyone who can submit jobs to the print queue
If the argument list is omitted from a for command, where does it take its values from?
- The $* shell variable
- The $@ shell variable
- Redirected input
- Redirected output
"Without using the shift command, what range of command-line argument variables can be referenced correctly? "
- $0 to $9
- $0 to $10
- $1 to $9
- $1 to $10