Commands tagged bash (821)

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

Suspend to ram
No need to be root to do that. Relies on UPower (previously known as DeviceKit-Power).

List just the executable files (or directories) in current directory
A bit shorter ;)

Display total Kb/Mb/Gb of a folder and each file

Indent all the files in a project using emacs
use -iname \*[.ch] instead of -iname \*.c -o -iname \*.h

print text in color red
eg: $printTextInColorRed foo bar foo bar [in red color]

Google Translate
Usage: $ translate Example: $ translate hello en es See this for a list of language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Get a BOFH excuse
Gets a BOFH excuse from the BOFH excuse server (towel.blinkenlights.nl port 666), and passes it through sed and tr to get rid of telnet connection stuff.

Make directories for and mount all iso files in a folder

Random Futurama quote
Random Futurama quote from http://cubemonkey.net/quotes/. Change the quote= to change the quote source.

Display disk partition sizes
Use lsbk (list block) and jq (to manipulate a JSON on the command line) to display partition information:


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: