Home | Download | Documentation | Programming | FAQ | About Me
7 Most Frequently Used Command Combinations

1) If the cpu consumption is high and we use top to find the process(for example,id 1234) consumes high cpu ,
to terminate that process
[root@localhost ~]#top
[root@localhost ~]#kill 1234


2)To search particular text within a directory use grep -r
[root@localhost ~]#grep -r 'search_text' /directory/path

3)Just know whether the remote is accessible or not.
[root@localhost ~]#ping 10.232.13.99
To know ipaddress use ,
[root@localhost ~]#ifconfig

4)To search for particular file use find
[root@localhost ~]#find /target/directory -name filename.txt

5)To copy files between two machines:
[root@localhost ~]#scp -r oss@10.232.13.99:/root/Deskrop/dir1 .
It copies whole directory dir1 from machine 10.232.13.99 to current system.
'.' tells to copy the content to current working directory.

6)To login to remote machine:
[root@localhost ~]#ssh oss@10.232.13.99

7)To check status of some process.(example mysql) : use ps with grep
[root@localhost ~]#ps aux | grep mysql

Powered by
Open Source Programmers