commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
...can do similar w/ tar, dd, xfsdump, e2fsdump, etc.
vimdiff to remotehost
Useful if you have to tunnel ssh through a local port and it complains of the host key being different. Much easier than manually editing the file.
Ping machine once, waiting 1 second for response until failing. Upon fail, ssh globally, otherwise ssh locally.
now you can acces the website by going to http://localhost:2001/
Useful for checking if there are differences between local and remote files.
it compresses the files and folders to stdout, secure copies it to the server's stdin and runs tar there to extract the input and output to whatever destination using -C. if you emit "-C /destination", it will extract it to the home folder of the user, much like `scp file user@server:`.
the "v" in the tar command can be removed for no verbosity.
This counts the number of httpd processes running.