Popular
Latest Articles
- How to Secure your Cisco Router
- Creating CLI Views on a Cisco Router
- Configuring TACACS+ on a Cisco Router
- How to enable SDM on your router
- Build a Samba Server on Redhat / CentOS
- How to set the Time / Date and Timezone in CentOS
- How to install SSH on Solaris 10 x86
- ESX4 - How do I turn on/off a Virtual Machine from the command line ?
UNIX - Useful Linux commands
Saturday, 07 June 2008 02:17
General Commands
| whatis | Brief descriptino of file |
| strings | Finds human readable strings |
| whereis cat | Shows directory for command |
| find /var/log/ -name local\* -mtime +2 -exec rm {} \; | Removes files named local* but last 3 days |
| unset TMOUT TIMEOUT | Remove terminal timeouts |
| type/which | Find path of program |
| cut -d: -f1 | use a : delimter and display field 1 |
| find / -name "*tgz" -exec ls -l {} \; | list tgz's |
bc -l | binary calculator |
| base64 | encode /decode images |
Networking Commands
| netstat -s | Shows networking stats |
| eth-tool | Networking Tool |
| mii-tool | Networking Tool |
| /proc/net/ip_conntrack | |
| /proc/net/sockstat | Shows Sockets in us |
| /proc/net/dev | networking stats |
User Commands
| last | who logged in last |
| who | whos logged in |
| fuser -va 22/tcp | Which user is using TCP 22 |
| fuser -va /var | Which user is using /var |
System Resources
| ps -auxw | sort -k3 -r | head -n10 | show processes by cpu usage |
| lshw -C disk -html > /tmp/diskinfo.html | output disk info to html |
| cat /proc/meminfo | Shows memory stats |
| ps -e | awk '{ print $4 }' | sort | uniq -c | sort -nr | head | Shows process totals |
| du -skh * | Diskpace usage |
| nice -n 10 cat | Make priority weaker |
| nice -n -10 cat | Make priority higher |
| vmstat 5 5 | Checks CPU every 5 secs , 5 times |
Disto Specfic
| chkconfig --list | Redhat - Show Run levels |
| chkconfig ssh on | Redhat - Adds program to run levels |
We have 25 guests online