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

Edit a PDF's metadata using exiftool
Edit the pdf file foo.pdf's metadata. -overwrite_original overwrites the original file (w/o it exiftool creates a new file)

Fetch all GPG keys that are currently missing in your keyring
For instance, if people have signed your key, this will fetch the signers' keys.

Rename files in batch

[vim] Clear a file in three characters (plus enter)
% selects every line in the file. 'd' deletes what's selected. It's a pretty simple combination.

Git Global search and replace
Find all the occurrences in the git repo of 'foo' and replace with 'bar'

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

List all files modified by a command
This lists all files modified after calling some command using a temporal anchor.

Using netcat to copy files between servers
It bypasses encryption overhead of SSH and depending on configuration can be significantly faster. It's recommended to use only in trusted networks.

Rename all .jpeg and .JPG files to .jpg

scan whole internet and specific port in humanistic time
apt-get install git gcc make libpcap-dev git clone https://github.com/robertdavidgraham/masscan cd masscan make install -pDm755 bin/masscan /usr/bin/masscan


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: