Linux Interview Questions and Answers – Part 5

1. how to remove the file ?
rm source file to destination file

2. How to remove the directory?
rmdir source directory to destination directory

3. What is relative path explation?
Relative path contains only the path relativaly to a certain folder, for instance.

4. What are the monitoring commands , do you know and explian how to monitor?
top : The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds
Vmstat: The command vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.
W : w command displays information about the users currently on the machine, and their processes.
Ps : ps command will report a snapshot of the current processes.
iptraf : The iptraf command is interactive colorful IP LAN monitor. It is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It can provide the following info in easy to read format:
Network traffic statistics by TCP connection
IP traffic statistics by network interface
Network traffic statistics by protocol
Network traffic statistics by TCP/UDP port and by packet size
Network traffic statistics by Layer2 address
nmap – scan your server for open ports
Ntop web based tool – ntop is the best tool to see network usage in a way similar to what top command does for processes i.e. it is network traffic monitoring software. You can see network status, protocol wise distribution of traffic for UDP, TCP, DNS, HTTP and other protocols.
lsof – list open files, network connections and much more.

5. How to create a multiple file with extension of .exe?
touch { a,b,c,d,e,f,g,h }*.exe

6. How to remove all the files with extension .exe?
rm –rf *.exe

7. How to view the file ?
using this command to view the file
Vi – editor

8. What is vi and vim and nano explain about more?
vi-Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs
vim-Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs
nano – This is a GNU replacement for pico. Works and looks like pico, but it is smaller, better, and licenced under the General Public Licence.

9. How to check your commands (what are the commands you enter it still)
history command using to check the command you enter it still

10. what less and more , explain about more ?
Less less command is used to display text in the terminal screen. It just prints the text in the given file, you cannot edit or manipulate the text here. To display the file from the specified line, enter the line number followed by colon(:). It allows Forward and backward movement in the file.
More More is a filter for paging through text one screenful at a time. This version is especially primitve. Users should realize that less(1) provides more(1) emulation and extensive enhancements.

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

One Response to “Linux Interview Questions and Answers – Part 5”

  1. Mark says:

    Thank you . Your questions is being tremendously helpful to my startup.

Leave a Reply

Your email address will not be published. Required fields are marked *

7 − four =

Popup Dialog Box Powered By :
  • RSS
  • Facebook
  • Google+
  • Twitter