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

remove oprhan package on debian based system

Compress files found with find
tar options may change ;) c to compress into a tar file, z for gzip (j for bzip) man tar -print0 and -0t are usefull for names with spaces, \, etc.

HourGlass
Displays an animated hourglass for x amount of seconds

Search and play MP3 from Skreemr
This use the Screemr search engine to play mp3 songs

print contents of file from line 1 until we match regex
Start printing the contents of filename to stdout, until a matching line to regex is found, then stop.

Backup with versioning
Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted. Inspired by EVACopy http://evacopy.sourceforge.net

Switch to the previous branch used in git(1)
Very useful if you keep switching between the same two branches all the time.

Exclude inserting a table from a sql import
Starting with a large MySQL dump file (*.sql) remove any lines that have inserts for the specified table. Sometimes one or two tables are very large and uneeded, eg. log tables. To exclude multiple tables you can get fancy with sed, or just run the command again on subsequently generated files.

Bash Dialog
The dialog utility is used to create a basic level graphical user interface. We can use this in Shell script to create very useful programs.

Get the size of all the directories in current directory


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: