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

Comparison between the execution output of the last and penultimate command
Useful for checking if there are differences between last and penultimate command.

Find commets in jpg files.
Finds comments in jpg files, but I can't figure out how to exclude (in output) files without comments.

check open ports without netstat or lsof

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

External IP (raw data)
can be used in script like : echo $(wget -qO- http://utils.admin-linux.fr/ip.php)

Get the full path to a file
Part of coreutils - so needs no extra package...

remote diff with side-by-side ordering.
more information: man sdiff

Diff XML files
Diffs two xml files by formatting them first using xmllint and then invoking diff. Usage: diffxml XMLFile1 XMLFile2

On Mac OS X, runs System Profiler Report and e-mails it to specified address.
Replace "user@domain.com" with the target e-mail address. Thanks to alediaz for "$HOSTNAME" which is very useful when running the command with Apple Remote Desktop to multiple machines simultaneously.

Create md5sum of files under the current dir excluding some directories
Useful if you want get all the md5sum of files but you want exclude some directories. If your list of files is short you can make in one command as follow: $ find . -type d \( -name DIR1 -o -name DIR2 \) -prune -o -type f -exec md5sum {} \; Alternatively you can specify a different command to be executed on the resulting 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: