Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Great for finding which jar some pesky class is hiding in!
if you need a quick way of printing out all the packages that contain classes this command will print the directory structure and replace '/' with '.'
It will also ignore CVS directories (we use CVS here)
List all open files of all processes.
.
$ find /proc/*/fd
Look through the /proc file descriptors
.
$ -xtype f
list only symlinks to file
.
$ -printf "%l\n"
print the symlink target
.
$ grep -P '^/(?!dev|proc|sys)'
ignore files from /dev /proc or /sys
.
$ sort | uniq -c | sort -n
count the results
.
Many processes will create and immediately delete temporary files.
These can the filtered out by adding:
$ ... | grep -v " (deleted)$" | ...
This is a big time saver for me. I often grep source code and need to edit the findings. A single highlight of the mouse and middle mouse click (in gnome terminal) and I'm editing the exact line I just found. The color highlighting helps interpret the data.
-L is for following symbolic links, it can be omitted and then you can find in your whole / dir
The fact that Linux exposes the ACPI tables to the user via sysfs makes them a gold mine of valuable hardware information for low-level developers. Looping through each of them and disassembling them all makes them even more valuable.
Useful if you want get all the md5sum of files but you want exclude some directories. If your list of files is short you can make in one command as follow:
$ find . -type d \( -name DIR1 -o -name DIR2 \) -prune -o -type f -exec md5sum {} \;
Alternatively you can specify a different command to be executed on the resulting files.
Searches all log files (including archived bzip2 files) for invalid user and PAM authentication errors, both of which are indicative of brute force attempts at logging into computer. A list of all unique IP addresses and domain names is appended to hosts.deny. The command (and grep error messages) will work on Mac OS X 10.6, small adjustments may be needed for other OSs.