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

Merge files, joining each line in one line

exclude a column with cut
Show all columns except 5th. This might help you save some typing if you are trying to exclude some columns from the output.

Split video files using avconv along keyframes

cleanup /tmp directory
Cleans all files in /tmp that have been accessed at least 2 days ago.

Converts multiple youtube links to mp3 files
Usage: ytmp3 "YTurl" "YTurl2" "YTurl3" "YTurlN" Uses the shift command to let you extract the .mp3 from as many youtube urls as you like (or wherever else youtube-dl is supported) *Requires youtube-dl Orginal chunk of code: youtube-dl -q -t --extract-audio --audio-format mp3 URL taken from here http://www.commandlinefu.com/commands/view/9701/convert-youtube-videos-to-mp3

Print github url for the current url
Works for repos cloned via ssh or https.

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

Install pip with Proxy
Installs pip packages defining a proxy

Get absolut path to your bash-script
Another way of doing it that's a bit clearer. I'm a fan of readable code.

Adding Prefix to File name
Good old bracket expansion :-) For large numbers of files, "rename" will spare you the for-loop, or the find/exec...


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: