Check These Out
Shows all block devices in a tree with descruptions of what they are.
# CC with SSN dash ( low false positive only match ###-##-#### not any 8digi number )
$
find . -iname "*.???x" -type f -exec unzip -p '{}' '*' \; | sed -e 's/]\{1,\}>/ /g; s/[^[:print:]]\{1,\}/ /g' | egrep "\b4[0-9]{12}(?:[0-9]{3})?\b|\b5[1-5][0-9]{14}\b|\b6011[0-9]{14}\b|\b3(?:0[0-5]\b|\b[68][0-9])[0-9]{11}\b|\b3[47][0-9]{13}\b|\b[0-9]{3}-[0-9]{2}-[0-9]{4}\b"
$
rmccurdyDOTcom
If you know the benefits of screen, then this might come in handy for you. Instead of ssh'ing into a machine and then running a screen command, this can all be done on one line instead. Just have the person on the machine your ssh'ing into run something like
$ screen -S debug
Then you would run
$ ssh -t user@host screen -x debug
and be attached to the same screen session.
Use the command watch, which is really hard to pass nested quotes to, and insert newlines where they are supposed to go in the HTTP request. that is after 1.1 after the host and two newlines at the end before the EOF.
i use this all day
what? no support for HEREDOCs on commandlinefu's interface? need more fu.
syntax follows regular command line expression.
example: let's say you have a directory (with subdirs) that has say 4000 .php files.
All of these files were made via script, but uh-oh, there was a typo!
if the typo is "let's go jome!" but you meant it to say "let's go home!"
find . -name "*.php" | xargs perl -pi -e "s/let\'s\ go\ jome\!/let\'s\ go\ home\!/g"
all better :)
multiline: find . -name "*.php" | xargs perl -p0777i -e 's/knownline1\nknownline2/replaced/m'
indescriminate line replace: find ./ -name '*.php' | xargs perl -pi -e 's/\".*$\"/\new\ line\ content/g'
rpm, sometimes, is not wildcard friendly. To search files installed from package this could be useful.
change PACKAGENAME to any package do you want to search
Quick method of isolating filenames from a full path using expansion.
Much quicker than using "basename"
View details of both TCP and UDP network activity within a specified port range.
Sample command to obtain a list of geographic localization for established connections, extracted from netstat. Need geoiplookup command ( part of geoip package under CentOS)