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

Function to create an alias on the fly
Is used like this: mkalias rmcache "rm -rfv app/cache/*"

pretend to be busy in office to enjoy a cup of coffee
Create a progress dialog with custom title and text using zenity.

list block devices
Shows all block devices in a tree with descruptions of what they are.

removing syncronization problems between audio and video
This assumes that there is a 10.2 sec delay between the video and the audio (delayed). To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie

ls not pattern
I've been looking for a way to do this for a while, get a not pattern for shell globs. This works, I'm using to grab logs from a remote server via scp.

BASH: Print shell variable into AWK
Alternatively: export MyVAR=84; awk '{ print ENVIRON["MyVAR"] }'

See your current RAM frequency
man dmidecode [look for type]

Send pop-up notifications on Gnome
The title is optional. Options: -t: expire time in milliseconds. -u: urgency (low, normal, critical). -i: icon path. On Debian-based systems you may need to install the 'libnotify-bin' package. Useful to advise when a wget download or a simulation ends. Example: $ wget URL ; notify-send "Done"

Split File in parts
Split File in 19 MB big parts, putting parts together again via cat Nameforpartaa Nameforpartab Nameforpartac >> File

Append stdout and stderr to a file, and print stderr to the screen [bash]
Useful for cron jobs -- all output will be logged but only errors will cause email to be sent. NB the order of "2>&1" and ">> logfile" is important, it doesn't work if you reverse them (everything goes to the logfile, nothing left for tee).


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: