Tuesday, July 7, 2009

Linux commands to remember

lsof -p [pid]|grep TCP
List ports currently in use by the process.

top
List top processes using CPU.

rpm -qa
List all installed applications

faillog
Command to display and reset locked IDs

find . -type f -name '*.jar' -exec sh -c 'unzip -l "{}" | grep -q filename' \; -print
Command to recursively search through jar files to search for the jar files that have a filename in them