System Administration Self Evaluation Test [ Unix Concepts 1 ]


Instructions
This self evaluation test is designed for junior to mid-level Unix sysadmin. There are 20 multiple choice questions to be answered. Please read all the choices before clicking on the right one. If a question has more than one right choices then you have to click better of those. Also you must attempt all the questions before clicking on "Test" button at the bottom of the page.

Q 1 Which of the following statements is FALSE with regards to file permissions?
   Execute permission on a directory makes it possible to 'cd' to it    Default file creation mode of 754 requires umask to be set to 023
   Symbolic links are indicated by 'l' and hard links by 's' as first character in the permissions strings of 'ls -l' command    Block device special files are indicated by 'b' and character ones are by 'c' as the first character in permissions string of 'ls -l' command
 
Q 2 What is the output of following shell command?
$ grep '^.\{8\}.TXT' infile
   All the lines containing 8 character name followed by .TXT extension    All the lines without 8 characters followed by .TXT extension
   All the lines starting with 8 character name followed by .TXT    All the lines starting with 9 characters followed by TXT
 
Q 3 What state according to System V run level definitions is run level 3?
   Remote file sharing state    Multiuser normal operating state
   Firmware state used for system level maintenance    Currently unused state configurable by administrator
 
Q 4 Which of the following statements is TRUE with regards to symbolic links?
   A symbolic link can't span across filesystems of different type    A file gets deleted once last of the symbolic link pointing to it gets deleted
   Creating symbolic links on directories may create cyclical directory causing problems with utilities such as 'find'    Symbolic link is a special type of file whose data contains pathname of pointed to file
 
Q 5 Which of the following information is not stored in an inode?
   Filename    File Owner and group IDs
   File creation, access and modification times    Disk location addresses where file is stored
 
Q 6 What is the output of the following command?
$ cut -d"|" -f2 inv.dat | sort| uniq -c| tee inv.out
   It shows items from inv.dat file sorted by second field with uniq items and their count and write them to inv.out file    It cuts the second field from inv.dat file and sorts and then uniq values are written to inv.out file
   It shows the second field from inv.dat file sorted then uniq values are written to inv.out file    The inv.dat file is sorted and then uniq values are written to inv.out file
 
Q 7 Which one of the following statements is FALSE with regards to Unix process?
   A process uses system call interface to control I/O devices    Each process has its own set of registers and virtual address space
   A process is started by 'fork' system call and terminated with 'exit' or by a signal    A process retains its resources after termination untill its parent calls 'wait' system call
 
Q 8 Which of the following statements is FALSE with regards to superblock?
   A superblock stores information about number of free blocks and inodes    Kernel reads superblock metadata while mounting the filesystem
   A superblock contains bootstrap loader required to load the operating system    Each filesystem has a superblock
 
Q 9 Which of the following statements is FALSE with regards to Unix shell?
   "kill -9 $$" will log you out by killing login shell    The "$#" parameter will list all the arguements specified in a command line
   The "$?" parameter stores the exit status of the last command    "echo $0" statement inside a shell script will print the script name itself
 
Q 10 What would be the group ID of a file created in a directory with sticky bit set?
   The same as the effective GID of the creating user or process    If SGID is set on the directory then it would be the GID of the parent directory or else the effective GID of the creating process
   It would be the GID of the parent directory    It would be the same as creating users group listed in passwd file
 
Q 11 Which one of the following is not a process attribute?
   Inode number    Nice number
   Effective user ID    Parent process ID
 
Q 12 Which of the following statements is FALSE with regards to unix scheduler?
   The scheduler increases a process priority in order to schedule and reduces its priority after the process recieved some processor time    Multiple processes of the same priority are placed on a run queue and process at the head of that queue is scheduled to run first
   Most unixes use preemptive round robbin scheduling    The only factor affecting process priority is its nice value
 
Q 13 What is the output of the following command?
$ grep '\(..\)-\1-\1' datelist
   It will print the line containing 02-1-1 pattern if it exists in the file    It will print all dates in the file with dd-mm-yy format if they exist in the file
   It will display the line containing 02-02-02 string if it exists in the file    It will print the patern aa-bb-cc if it exists in the file
 
Q 14 Which of the following statements is FALSE with regards to inittab file?
   Each entry in inittab file has a lable followed by runlevel, action and command name fields    A 'blank' run level field in an entry applies to all the run levels
   'respawn' in the action field of inittab indicates that the command has to be run only once    'wait' in the action field would start a process and wait untill it finishes before going to the next entry for that run level
 
Q 15 what is the output of the following command?
$ sed -n '/[aA]dmin/p' people.lst | tee list2
   It will show all the lines with admin or Admin pattern    It will show all the lines with admin or Admin pattern and list to list2 file
   It will show all the line without admin or Admin pattern and list to list2 file    It will show admin or Admin pattern but not Administrator and list to list2 file
 
Q 16 What is /proc filesystem?
   Its an iterface to address space of processes    Its a RAM based filesystem implemented in kernel for storing temporary files
   It provides interface to individual processor on a multiprocessor system    Its a fast filesystem overlayed on a slower filesystems such as NFS for caching purpose
 
Q 17 Which of the following statements is FALSE with regards to System V IPC?
   System V IPC provides semaphore, message queues and shared memory mechanisms    'ipcs' command can be used to list current status of shared memory in the system
   Shared memory area is a part of physical memory shared by multiple processes providing fastest mechanism for sharing data    The semaphore mechanism points to a linked list containing a type value followed by data area
 
Q 18 What would be the output of following command?
$ head -10 list.db | tr '[a-z][A-Z]'
   It would convert lowercase characters to uppercase for the first 10 lines of the file    It would replace letters a or z with uppercase A or Z for the first 10 lines of the file
   It would convert lowercase to uppercase the 10th line from list.db file    It would print alphabetical characters from the 10th line from the file
 
Q 19 Which of the following statements is FALSE with regards to vi editor?
   'd$' command deletes to the end of the line and '10dd' deletes 10 lines    To save file and then quit editing you can type "ZZ" or ":wq" or ":x"
   To create a buffer 'a' with 5 lines type '"a5yy' and to copy the contents of that buffer bellow the current line type '"a5p'    To mark a point in the file called 'a' press 'ma' and to move back to that point during editing type ''a'
 
Q 20 What would be the output of the following command?
$ sed 's/\(..\)-\(..\)-\(....\)/$3-$2-$1/' file
   It would change date format in the file from mm-dd-yyyy to yyyy-mm-dd    It would change date format in the file from dd-mm-yyyy to yyyy-mm-dd
   It would replace date in a file by the arguments set in the shell    It would result in invalid syntax error