[email protected]:~# lsof
lsof means “list open files”, it displays all the files that are currently opened. It shows which processes uses a certain file
logsave captures output of a program and sends it to a log-file
[email protected]:~# logsave -a test.log echo "hello world"
Watch executes a program periodically and outputs the contents on the screen.
[email protected]:~# watch 'ls ; echo ; pwd'
To login to remote host
Service command is used to run the linux machine init scripts.
To Check the status of all the services.
[email protected]:~# service –status-all
When we want to find out where a specific Unix command exists, eg
[email protected]:~# whereis java
Similarly whatis to display single line description about a command, eg :- whatis ls
7.) To set the date, date -s "11/5/2017 23:59:53"
Once we’ve changed the system date, we should syncronize the hardware clock with the system date as shown below.
[email protected]:~# hwclock --systohc –utc
wget method is used to download software, video from internet.
[email protected]:~# wget http://prdownloads.sourceforge.net/sourceforge/softwareName/softwareVersion
The Awk searches files to see if they contain lines that matches given specified patterns and then perform associated actions. Below command finds lines with first column value greater than 100
[email protected]:~# awk '$1 >100' students.txt
To connect to a FTP server using ftp command
[email protected]:~# ftp IP/HostName
Use the get command to download file from a remote ftp server
ftp> get fileName
Ifup configures a network interface/enables a network connection.
Ifdown shuts down a network interface/disables a network connection.
Sdiff finds differences between two files by producing list indicating lines that are dissimilar
tcpdump allows us to analyze network activity
[email protected]:~# tcpdump
wireshark is graphical tool to analyze network packets
ncat is modern replacement to telnet
below command is used to establish a connection on port 80 to a host named remotehost
[email protected]:~# ncat remotehost 8080
16.) yum or rpm
Similar to apt-get for managing, installing software packages in linux
netstat provides the complete information on how the network interface is performing.
[email protected]:~# netstat
Translating the host name to IP addresses is known as name resolution. The host has a special file called hosts, which stores the IP Address – Hostname pairs.
In /ect/hosts file we can assign name to any IP address in our network.
[email protected]:~# cat /etc/hosts
The command w is a combination of uptime and who
[email protected]:~# w
mpstat reports processors statistics, below command displays all the individual CPUs (or Cores) along with its statistics.
[email protected]:~# mpstat -p ALL
Strace displays the system calls used by the process, and the signals received by the process.
[email protected]:~# strace ls -lf
GKrellM stands for GNU Krell Monitors, or GTK Krell Meters. It is GTK+ toolkit based monitoring program, that monitors various sytem resources.
A network utility program used to obtain information about Internet servers.
dig is a tool for querying DNS nameservers for information about host addresses