linux interview questions(11-20)
You wish to restore the file memo.ben which was backed up in the tarfile MyBackup.tar. What command should you type?
tar xf MyBackup.tar memo.ben
This command uses the x switch to extract a file. Here the file memo.ben will be restored from the tarfile MyBackup.tar.
You need to view the contents of the tarfile called MyBackup.tar. What command would you use?
tar tf MyBackup.tar
The t switch tells tar to display the contents and the f modifier specifies which file to examine.
You want to create a compressed backup of the users’ home directories. What utility should you use?
tar
You can use the z modifier with tar to compress your archive at the same time as creating it.
What daemon is responsible for tracking events on your system?
syslogd
The syslogd daemon is responsible for tracking system information and saving it to specified log files.
You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?
split
The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines.
You would like to temporarily change your command line editor to be vi. What command should you type to change it?
set -o vi
The set command is used to assign environment variables. In this case, you are instructing your shell to assign vi as your command line editor. However, once you log off and log back in you will return to the previously defined command line editor.
What account is created when you install Linux?
root
Whenever you install Linux, only one user account is created. This is the superuser account also known as root.
What command should you use to check the number of files and disk space used and each user’s defined quotas?
repquota
The repquota command is used to get a report on the status of the quotas you have set including the amount of allocated space and amount of used space.



