System Admin Q & A – V

Ques 1: – Write a command to find all of the files which have been accessed within the last 30 days.

find / -type f -atime -30 > files.txt

This command will find all the files under root, which is ‘/’, with file type is file. ‘-atime -30′ will give all the files accessed less than 30 days ago. And the output will put into a file call files.txt.

Ques 2: – What is difference between ARP and RARP ?

Ans: – The address resolution protocol (ARP) is used to associate the 32 bit IP address with the 48 bit physical address, used by a host or a router to find the physical address of another host on its network by sending a ARP query packet that includes the IP address of the receiver. The reverse address resolution protocol (RARP) allows a host to discover its Internet address when it knows only its physical address.

Ques 3: – What command is used to remove the password assigned to a group ?

# gpasswd -r

The gpasswd command is used to change the password assigned to a group. Use the -r option to remove the password from the group.

Ques 4: – What is NETBIOS and NETBEUI ?

Ans: – NETBIOS is a programming interface that allows I/O requests to be sent to and received from a remote computer and it hides the networking hardware from applications.
NETBEUI is NetBIOS extended user interface. A transport protocol designed by microsoft and IBM for the use on small subnets.

Ques 5: – What does nslookup do? Explain its two modes ?

Ans: – Nslookup is used to find details related to a Domain name server. Details like IP addresses of a machine, MX records, servers etc. It sends a domain name query packet to the corresponding DNS.

Nslookup has two modes. Interactive and non interactive. Interactive mode allows the user to interact by querying information about different hosts and domains.

Non interactive mode is used to fetch information about the specified host or domain.

Interactive mode:

Nslookup [options] [server]

Ques 6: – How to disable USB in grub ?

Ans: – Open the Grub configuration file

#vi /boot/grub/menu.lst

Add “nousb” at the end of the Kernel Line. Like the following

kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb

Ques 7: – What is the main advantage of creating links to a file instead of copies of the file ?

Ans: – The main advantage is not really that it saves disk space (though it does that too) but, rather, that a change of permissions on the file is applied to all the link access points. The link will show permissions of lrwxrwxrwx but that is for the link itself and not the access to the file to which the link points. Thus if you want to change the permissions for a command, such as su, you only have to do it on the original. With copies you have to find all of the copies and change permission on each of the copies.

Ques 8: – What command would you type to use the cpio to create a backup called backup.cpio of all the users’ home directories ?

 find /home | cpio -o > backup.cpio

The find command is used to create a list of the files and directories contained in home. This list is then piped to the cpio utility as a list of files to include and the output is saved to a file called backup.cpio.

Ques 9: – You would like to temporarily change your command line editor to be vi. What command should you type to change it ?

Ans: – 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.

Ques 10: – You have two files each ten lines long. What text filter could you use to combine the two files so that each line of the output contains the corresponding line from each file ?

Ans: – join
The join text filter will display one line for each pair of input lines from two files.

Leave a Reply