Unix and Shell Programming
Covers Unix commands, file system operations, shell programming, system calls, and Unix administration tasks
Questions
Which of the following commands is used to sort the files in order of last access time?
- ls -u
- ls -a
- ls -t
- ls -desc
How can we be accessed by other machine in which Unix is absent, i.e remote login?
- telnet
- ftp
- rlogin
- rmtlogin
Which of the following properties is not present in 'inode'?
- Owner of file
- Name of file
- Permissions of file
- Date of creation
Which of the following commands is used to perform only integer manipulation in unix?
- ac
- bc
- mc
- zc
____________ implies shutdown and reboot modes.
- Init level 6
- Init level 1
- Init level 2
- None of these
Which of the following commands is used to change the access time of a file?
- Date
- Date -s [ format ]
- Touch
- Both (1) and (2)
What is the meaning of the command 'cat abc 2>xyz, 2>'?
- Redirects the abc 2 to xyz
- Redirects the content of abc and 2 to xyz
- Both (1) and (2)
- None of these
Which of the following commands is used for counting number of arguments in a command line?
- wc args
- arg wc
- argc
- both (1) and (2)
Which of the following functions is used to execute UNIX command in C program?
- excelp
- execlp
- xcel
- none of these
Where are the encrypted passwords of users of the system stored?
- /etc/shadow
- /etc/profile
- /etc/passwd
- none of these
Who checks the correct password with authorized user?
- Init
- Init and getty
- Getty
- None of these
Which of the following external commands is used to handle a character by splitting its input into two components?
- Tee
- Tree
- Pee
- Fsplit
Which of the following system directory files is fully responsible for mount init files of unix?
- /etc/motd
- /etc/mt
- /etc/umt
- none of these
What is the output of the syntax - echo $(PS1 + PS2)?
- PS1
- PS2
- Both (1) and (2)
- None of these
Which of the following commands is used to repair the file system?
- fsck
- fschk
- filechk
- all of the above
Which of the following commands is used to see all background processes in unix system?
- AT
- Jobs
- Kill
- None of these
Which of the following commands is used to take the backup of files and directories on the magnetic disks?
- tar -xvwf file1.tar
- tar -cvwf file1.tar text1.txt
- tar -cv
- none of these
What is the meaning of $NF in awk?
- The last field of the current record
- Maximum number of records
- Number of fields in the record
- None of these
Which of the following system calls is used to remove the file from file system?
- rmdir
- unlink
- rm
- none of these
Which of the following system calls is used to duplicate the file in another file?
- replic
- duplic
- dup
- none of these
Which of the following commands is not used in multiple editing file?
- :rew!
- :q!
- :n!
- all of the above
Which of the following is not a component of file system of unix?
- The boot block
- The meta block
- The super block
- The inode block
Which of the following libraries is not automatically loaded?
- Cmath
- <stdio.h>
- <iostream.h>
- none of these
Which of the following commands is used to continue the running process if user has logged out?
- cd
- nohup
- hupno
- none of these