Check These Out
you may create an alias also, which I did ;-)
alias sshu="ssh -o UserKnownHostsFile=/dev/null "
Prompts the user for username and password, that are then exported to http_proxy for use by wget, yum etc
Default user, webproxy and port are used.
Using this script prevent the cleartext user and pass being in your bash_history and on-screen
It will only work if the service NETSEND in the Windows machine is enabled.
Useful in root's .profile - will auto-logout after TMOUT seconds of inactivity.
Close after `seconds` inactive.
export TMOUT=seconds
(unefunge)
copying files from one server to another using rysnc. Root access need to be allowed on the destination.
As of 10.04 LTS, you need to use this command-line to reports bugs to the launchpad.net tracking system (you need a launchpad acct for this to work). This command is preferred over using the website because it collects/sends info about your system to help developers.
ubuntu-bug is a symlink to apport-bug which sees if KDE/Gnome is running and calls apport-gtk/apport-kde dialogs, otherwise apport-cli, so you can fill out a bug report.
First run 'ubuntu-bug' without args to see a list of known symptoms. If there's no matching symptom, or you know which package is to blame, then run 'ubuntu-bug <package>'. If the process is still running, use 'ubuntu-bug <PID>'
Removes an iptables rule created by fail2ban. This example shows how to remove a rule for an IP from the fail2ban-SSH chain. Can be used for any service monitored by fail2ban.
For more on fail2ban, see http://www.fail2ban.org/wiki/index.php/Main_Page
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'