Below is a list of command with switches that I commonly use, but I still sometimes forget I hope you find this usefull as I do, I know some of them is pretty common but its good reference for me.
Gzip - removes the files after gzipping
------------
gzip -9
Check top 8 process using PRSTAT
----------
prstat -s cpu -a -n 8
Vi - Search and Replace /g is for global
-----------
:%s/OLD/NEW/g
Tcpdump
-----------
tcpdump -xx -vv -n host -i and
Remount without Unmounting
-----------
mount -o remount /mounteddirectory
Disk Usage
----------
du -sm //-s - summarize
du -cam --max-depth=1 //-c - give a total -a - include files (not just directories) -m - display in megabytes
Print Environment VAriable
-----------
printenv | less
or
env | less
Print Shell Variables
-----------
set | less
Find command - finding files more than 5mb on a directory
--------------
/usr/bin/find -size +50000000c -exec ls -lt {} \;
Find command - Find file and send error message to /dev/null
-------------
find -name 2>/dev/null
To check the duplex:
-------------
ndd /dev/hme link_mode
Where a return value of 0 = half duplex, and 1 = full duplex
To force to full duplex:
-------------
ndd -sec /dev/hme adv_100fdx_cap
ndd -set /dev/hme adv_autoneg_cap 0
To force to half duplex:
------------
ndd -sec /dev/hme adv_100hdx_cap
ndd -set /dev/hme adv_autoneg_cap 0
Thats it.
Gzip - removes the files after gzipping
------------
gzip -9
Computer and Network problem | How to below:
- 10 Steps | Remove Virus | Spyware Scanner Download | Free Software
- Easy Network troubleshooting | DNS Problem Guide
- Howto change DNS Server IP to OpenDNS
- Fix | COM Surrogate Error | Windows Vista
- 9 Easy Steps | Setting up a secured home wireless network
- Howto Permanently deleting files | data on your hard disk
- Full filesystem backup | ufsdump - For *nix
1 comments:
"gzip -9" is used to make gzip do best compression to the archive, not remove the files after zipping.
nice quick commands.
Post a Comment