Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Command line to get which PID is opening a socket on IP and PORT.
Only useful under Solaris.
# find assumes email files start with a number 1-9
# sed joins the lines starting with " " to the previous line
# gawk print the received and from lines
# sort according to the second field (received+from)
# uniq print the duplicated filename
# a message is viewed as duplicate if it is received at the same time as another message, and from the same person.
The command was intended to be run under cron. If run in a terminal, mutt can be used:
mutt -e "push otD~=xq" -f $folder
The really awesome bash completion in debian seems to be an extra package now, which has to be installed. After sourcing /etc/bash_completion it completes almost everything (package names in apt... etc) :-)
To make this permanent, put something like this in your .bashrc:
if [ -f /etc/bash_completion]; then
source /etc/bash_completion
fi
Shows a file without comments (at least those starting by #)
- removes empty lines
- removes lines starting by # or "some spaces/tabs then #'"
Useful when you want to quickly see what you have to customize on a freshly installed application without reading the comments that sometimes are a full 1000 lines documentation :)
While posting, I saw this http://www.commandlinefu.com/commands/view/1041/display-contents-of-a-file-wo-any-comments-or-blank-lines
But it's dirty and incomplete, to my mind
My original goal was to remove lines like "\t*#" but I can't figure out how to do a egrep '\t' on a command-line. Two workarounds if needed:
$egrep -v 'press control + V then TAB then #' /your/file
or
$egrep -v -f some_file /your/file #where some_file contains what you want to exclude, example a really inserted TAB
This command requires the imagemagick libraries and will resize all files with the .jpg extension to a width of 1024 pixels and will keep the same proportions as the original image.