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

batch convert Nikon RAW (nef) images to JPG
converts RAW files from a Nikon DSLR to jpg for easy viewing etc. requires ufraw package

Export a subset of a database
Limits the number of rows per table to X

Delete empty, 24-hours-old directories recursively, without consider hidden directories

count match string lines from file(s)

Summarise the size of all files matching a simple regex
Use the find command to match certain files and summarise their total size in KBytes.

peak amount of memory occupied by any process with "FOO" in its name
Show the maximum amount of memory that was needed by a process at any time. My use case: Having a long-running computation job on $BIG_COMPUTER and judging whether it will also run on $SMALL_COMPUTER.   http://man7.org/linux/man-pages/man5/proc.5.html VmHWM: Peak resident set size ("high water mark")

Tracklist reaplace backspace to '-'
Requires perl 5.14 or greater

Create a new file

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Rapidly invoke an editor to write a long, complex, or tricky command
Allows you to edit your command using your chosen editor. Works in bash with "set -o vi".


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: