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

burn a isofile to cd or dvd
cdrecord must be installed. usefull alias: $alias burniso='cdrecord -v dev=/dev/cdrom' now iso burning is like. $burniso image.iso

Remove a range of lines from a file
Delete a range of line

Save a copy of all debian packages in the form in which they are installed and configured on your system
A copy of all installed debian packages on your system will be put back together, with all changes in configuration files you made and placed in the current directory. Make sure you have enough disk space (say 2-3 GB). Break any time with Ctrl+C.

floating point operations in shell scripts
using bc is for sissies. dc is much better :-D Polish notation will rule the world...

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed

Calculate days on which Friday the 13th occurs (inspired from the work of the user justsomeguy)
Friday is the 5th day of the week, monday is the 1st. Output may be affected by locale.

monitor what processes are waiting for IO interrupts

recurisvely md5 all files in a tree
Found this little gem here: http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/

View files opened by a program on startup and shutdown
Run this before you run a command in order to see what the command does as it starts. The -c flag is useful here as the PID is unknown before startup. All config files, libraries, logs, ports, etc used by the command as it starts up, (and shuts down) will be captured at 1s intervals and written to a file. Useful for debugging etc.

history autocompletion with arrow keys
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.


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: