Commands by and3k (5)

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

display an embeded help message from bash script header
With this one liner you can easily output a standard help message using the following convention: Usage: is the start marker Stop at the last #

'hpc' in the shell - starts a maximum of n compute commands modulo n controlled in parallel, using make
this oneliner uses make and it's jobserver for parallel execution of your script. The '-j' flag for make defines number of subprocesses to launch, '-f' tells make use stdin instead of Makefile. Also make have neat flag '-l', which "Specifies that no new jobs (commands) should be started if there are others jobs running and the load is at least load (a floating-point number)." Also you can use plain Makefile, for better readability: targets = $(subst .png,.jpg,$(wildcard *.png)) $(targets): echo convert $(subst .jpg,.png,[email protected]) [email protected] all : $(targets)

Get full from half remembered commands
Show all commands having the part known by you. Eg: $apropos pdf | less

[git] Output remote origin from within a local repository
Great way to quickly grasp if a locally cloned repository originates from e.g. github or elsewhere.

List the Sizes of Folders and Directories

add an mp3 audio track to a video

Get File Names from touch commands
retrieve file names back from touch commands for them

get time in other timezones
On Ubuntu, if tzwatch is installed, then you can call up in terminal the output for every time zone configured in gWorldClock.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Read aloud a text file in Ubuntu (and other Unixes with espeak installed


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: