Linux interview questions – page 6
517 questions. Tap “Show answer” to check yourself.
-
Your default umask is 002. What does this mean?Choose one:a. Any file you create will have the permissions set as owner and group having read and write permissions; others as read only.b. Any file you create will have the permissions set as owner and grou
-
You have a file called administration with the following attributes-rw-rw-r-- 1 root admin 7202 Sep 17 9:10 administrationGeorge is a member of the admin group and Bob is a member of the sales group. Both George and Bob need to make changes to this file.
-
When using sed to replace one term with another it will print every line in the file and then print each line every time it does a replacement. What option should you add to the command line to only print the lines that are changed?Choose one:a. -nb. -pc.
-
Which of the following lines in your /etc/syslog.conf file will cause all critical messages to be logged to the file /var/log/critmessages?Choose one:a. *.=crit /var/log/critmessagesb. *crit /var/lo
-
Bob has created a new directory that will contain files that he and seven other users will be using for a new project. These eight users are the only members of the kickoff group. What does Bob need to do to give these users access to these files.Choose o
-
What would be the result of the command paste -s dog cat?Choose one:a. The corresponding lines from the files dog and cat would be pasted together separated by a tab.b. The corresponding lines from the files dog and cat would be pasted together separated
-
You are using tar to create a tarfile of the files contained in the /home/bob/memos directory. After making the /home/bob/memos directory your working directory, which of the following commands will create the file?Choose one:a. tar cf memos.tar .b. tar x
-
When is the most important time to restore a file from your backup?Choose onea. On a regular scheduled basis to verify that the data is available.b. When the system crashes.c. When a user inadvertently loses a file.d. When your boss asks to see how restor
-
You want to ensure that your system is not overloaded with users running multiple scheduled jobs. A policy has been established that only the system administrators can create any scheduled jobs. It is your job to implement this policy. How are you going t
-
When defining a cronjob, there are five fields used to specify when the job will run. What are these fields and what is the correct order?Choose one:a. minute, hour, day of week, day of month, monthb. minute, hour, month, day of month, day of weekc. minut
-
Which of the following items would not be important for you to record in your system documentation.Choose one:a. Any kernel patches you might apply.b. Applications that are installed.c. When did each user log on last.d. What problems with the system you h
-
You have a large spreadsheet located in the /data directory that five different people need to be able to change. How can you enable each user to edit the spreadsheet from their individual home directories?Choose one:a. Create a symbolic link in the /data
- Advertisement
-
You want to configure your system so that when you create a new user a customized .bash_logout file will be created in the new user's home directory. How can you do this?Choose one:a. Copy the .bash_logout file to the new user's home directory.b.
-
You issue the command mount without any options and the following output is displayed/dev/hda1 on / type ext2 (rw)none on /proc type proc (rw)/dev/hda9 on /home type ext2 (rw)/dev/hda7 on /tmp type ext2 (rw)/dev/hda5 on /usr type ext2 (rw)/dev/hda6 on /va
-
You need to search the entire directory structure to locate a specific file. How could you do this and still be able to run other commands while the find command is still searching for your file?Choose onea. find / -name filename &b. find / -name filename
-
Which one of the following factors does not play a role in choosing the type of backup media to use?Choose one:a. How frequently a file changesb. How long you need to retain the backupc. How much data needs to be backed upd. How frequently the backed up d
-
A listing of the /data directory showsdrw-rw-r-- 1 root accounting 17249 Sep 7 10:08 accountingdrw-rw-r-- 1 root admin 7202 Sep 17 9:10 administrationdrw-rw-r-- 1 root humres 13367 Sep 1 12:58 humresdrw-rw-r-- 1 root sales 9449 Sep 22 7:34 salesGeorge, wh
-
What is the purpose of the command xargs?Choose one:a. xargs is used to pass arguments from one command to another.b. xargs is used to redirect standard output to a file.c. xargs is used to redirect standard error to a file.d. xargs is used to use the con
-
You create a new user account by adding the following line to your /etc/passwd file.bobm:baddog:501:501:Bob Morris:/home/bobm:/bin/bashBob calls you and tells you that he cannot logon. You verify that he is using the correct username and password. What is
-
As the system administrator you have created a directory containing some scripts that you have written. You want to have all your users to be able to run this scripts. Which file should you edit to ensure that the scripts will run without your users havin
-
As a system administrator, you are instructed to backup all the users' home directories. Which of the following commands would accomplish this?Choose onea. tar rf usersbkup home/*b. tar cf usersbkup home/*c. tar cbf usersbkup home/*d. tar rvf usersbku
-
You telnet into several of your servers simultaneously. During the day, you sometimes get confused as to which telnet session is connected to which server. Which of the following commands in your .profile file would make it obvious to which server you are
-
You cannot mount /dev/hdb1 and suspect that the superblock is bad. How do you fix this?Choose one:a. Use the mkfs command.b. Use the fsck command with the -f option.c. Use the e2fsck to replace the superblock with a copy saved to another location on your
-
How does the locate and find commands differ in their method of searching?Choose one:a. locate uses the locatedb database and find searches the directory tree.b. find uses the finddb database and locate searches the directory tree.c. find searches the dir
- Advertisement
-
You have created a primary partition, a swap partition and an extended partition. You can format the primary partition but when you try to format the extended partition it fails. What is the problem?Choose one:a. You should have created another primary pa
-
In order to schedule a cronjob, the first task is to create a text file containing the jobs to be run along with the time they are to run. Which of the following commands will run the script MyScript every day at 11:45 pm?Choose one:a. * 23 45 * * MyScrip
-
You are running out of space in your home directory. While looking for files to delete or compress you find a large file called .bash_history and delete it. A few days later, it is back and as large as before. What do you need to do to ensure that its siz
-
You create a new user by adding the following line to the /etc/passwd filebobm::501:501:Bob Morris:/home/bobm:/bin/bashYou then create the user's home directory and use the passwd command to set his password. However, the user calls you and says that
-
You have a file named phonenos containing names and telephone numbers. Each line contains the telephone number followed by the name. You want to sort the file by telephone number in ascending order. Which of the following commands will accomplish this.Cho
-
You need to create two new directories in your home directory. The first one is called /home/bob/letters and the second one is /home/bob/letters/sales. Which of the following command lines should you use?Choose one:a. mkdir /home/bob/letters/salesb. mkdir