All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

Find the package that installed a command

Make sure your script runs with a minimum Bash version
If you use new features of a certain Bash version in your shell script, make sure that it actually runs with the required version.

journalctl -f
a tail -f variant of systemd journal. Follow the most recent updates or if events are appended to the journal

Find top 10 largest files in /var directory (subdirectories and hidden files included )
Should work even when very large files exist.

Runs previous command replacing foo by bar every time that foo appears
Very useful for rerunning a long command changing some arguments globally. As opposed to ^foo^bar, which only replaces the first occurrence of foo, this one changes every occurrence.

Analyze, check, auto-repair and optimize Mysql Database
A useful way to do a full check and auto repair damaged databases

Email HTML content
Note, this works because smtp is running

find and reduce 8x parallel the size of JPG images without loosing quality via jpegoptim

Replace spaces in filenames with underscores
I realize there's a few of these out there, but none exactly in this form, which seems the cleanest to me

Make shell (script) low priority. Use for non interactive tasks


Stay in the loop…

Follow the Tweets.

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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

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: