commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
Needs rpmorphan installed
This command, when run from the directory containing "filename", will remove the file and any hard or symbolic links to the file.
This uses wget instead of curl
This is a slight variation of an existing submission, but uses regular expression to look for files instead. This makes it vastly more versatile, and one can easily verify the files to be kept by running ls | egrep "[REGULAR EXPRESSION]"
Pulls all instances of table out of information schema, executes a SELECT COUNT(*) on each table/database instance, and then strips out any empty tables.
This will give you a friendly warning if a command doesn't exists.
Check if SSH tunnel is open and open it, if it isn't.
NB: In this example, 3333 would be your local port, 5432 the remote port (which is, afaik, usually used by PostgreSQL) and of course you should replace REMOTE_HOST with any valid IP or hostname. The example above let's you work on remote PostgreSQL databases from your local shell, like this:
psql -E -h localhost -p 3333
I constantly need to work on my local computer, thus I need a way to download the codeigniter user guide, this is the wget way I figured.
thx Montecristo, thx hckhckhck
This will delete the branch 'featureless' on the origin remote.
Do not forget to delete the branch locally using:
git branch -d featureless
'I got it here'-credit:
I duplicated here incase you stumbled here first.
Tested on Solaris.
If there is update available for the package you can see upgrade is from which version to which version. Also you will get detail about which release the package belongs to (stable/testing/sid).
Using sed to print newlines as doing it in one line with diff is non-trivial.
uses fifo and sets to a specific port. In this case 4201.
#_connects src_IP dst_IP When_It_Happened_Secs
search argument in PATH
accept grep expressions
without args, list all binaries found in PATH