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 all files previously extracted from a tar(.gz) file.

Convert YAML to JSON
Converts YAML file to JSON. Note that you'll need to install PyYAML. Also some YAML data types (like dates) are not supported by JSON).

LDAP search to query an ActiveDirectory server
These are the parameters to ldapsearch (from ldap-utils in Ubuntu), for searching for the record for Joe Blogg's user. sAMAccountName is the LDAP field that ActiveDirectory uses to store the user name. 'DOMAIN\Joe.Bloggs' where "DOMAIN" is the the active directory domain. Othewise you could use "CN=Joe.Bloggs,DC=example,DC=com" instead of "DOMAIN\Joe.Bloggs"

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows

Watch the progress of 'dd'
run this in another terminal, were xxxx is the process ID of the running dd process. the progress will report on the original terminal that you ran dd on

Annoying PROMPT_COMMAND animation
unset PROMPT_COMMAND to disable.

Downsample mp3s to 128K
This will lower the quality of mp3 files, but is necessary to play them on some mobile devices.

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

sum a column of numbers

Recursively remove directory with many files quickly
rsync'ing an empty directory over a directory to be deleted recursively is much faster than using rm -rf, for various reasons. Relevant only for directories with really a lot of files.


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: