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

Delete only binary files in a directory
Please note that binary file checking is NOT perfect. So, use it with caution. It does not delete hidden files whose name has a leading '.' character. And it regards an empty file as a binary file.

Prepend a text to a file.
Syntax: $ prepend content to add [filename] Uses ed, so no temp files created.

change up n directories
Change n directories up, without parameters change one up

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.

Dock Thunderbird in system tray and hide main window
Dock Thunderbird in system tray and hide main window. Very useful for startup scripts. Of course you can dock any app of your choice.

Network Folder Copy with Monitoring ( tar + nc + pv )
Transfer tar stream thru nc with pv montoiring taken from: http://www.catonmat.net/blog/unix-utilities-pipe-viewer/

Pronounce an English word using Merriam-Webster.com
The original was a little bit too complicated for me. This one does not use any variables.

Prefix every line with a timestamp
Useful to add a timestamp to every line printed to stdout. You can use `-Ins` instead of `-Iseconds` if you want more precision.

youtube2m3u
generate playlists from youtube ( or othre things that support yt-dlp)

ensure your ssh tunnel will always be up (add in crontab)
I find it ugly & sexy at the same time isn't it ?


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: