This page collects some useful bash commands that sometimes I don't remember.
Disk
The following command shows the partition list of your disk:$ df -f
Disk Usage - report the amount of disk space used
by the specified files and for each subdirectory
$ du -h
RAM
Display on standard output the RAM size in KB (kilobyte):$ grep MemTotal /proc/meminfo | awk '{print $2}'
Network
Check the status of port '8080'. The status can be: CONNECTED, LISTENING, etc...$ netstat -an | grep 8080
Kill a connection on a specific port, for example 8080
$ tcpkill -i eth0 port 8080
Miscellaneous
Remove all .svn (recursively)
$ find . -name .svn -exec rm -rf {} \;
Find all snapshot version in a maven project
$ find . -name pom.xml | xargs grep "SNAPSHOT"
No comments:
Post a Comment