Posts Tagged ‘linux tips’

Linux Tips

Display the top most process utilizing most CPU (top -b 1)
Show the working directory of a process ? (pwdx pid )
Display the parent/child tree of a process ? (ptree pid )
Display the no.of active established connections to localhost ? (netstat -a | grep EST)
How to create null file ? (cat /dev/null > filename1)
Display top ten largest files/directories ? (du -sk * | sort -nr | head)
Display disk usage (du -h)
How to save man pages to a file ? (man | col -b > filename )
Display the files in the directory by file size ? (ls -ltr | sort -nr -k 5)
Display the processes, which are running under yourusername ( ps -aef | grep username)
Display the all files recursively with path under current directory ? ( find . -depth -print)
Display the Disk Usage of file sizes under each directory in currentDirectory ? (du -k . | sort -nr)
List the files in current directory sorted by size ? (ls -l | grep ^- | sort -nr)

Read Full Post »