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

To Stop or Start (Restart) a Windows service from a Linux machine

Compare a remote dir with a local dir
You can compare directories on two different remote hosts as well: $ diff -y

Show running services (using systemctl)

Compare two files side-by-side
I found out about this from Unix Power Tools, and thought it was pretty useful. Use the -w option to change the width of the output, and the -s option to suppress lines that are the same in both files.

Rename duplicates from MusicBrainz Picard
Renames duplicates from MusicBrainz Picard, so you get the latest copy and not a bunch of duplicates.

For a $FILE, extracts the path, filename, filename without extension and extension.
Useful for use in other scripts for renaming, testing for extensions, etc.

Write on the console without being registered
http://www.linux-party.com/index.php/8157-escribir-en-la-consola-linux-sin-que-quede-registrado-en-el-history

Convert mysql database from latin1 to utf8
MySQL: CHARSET from latin1 to utf8

Find Duplicate Files (based on size first, then MD5 hash)
This dup finder saves time by comparing size first, then md5sum, it doesn't delete anything, just lists them.

Quickly Encrypt a file with gnupg and email it with mailx
This is a quick and easy way of encrypting files in a datastream, without ever really creating an output file from gpg. Useful with cron also, when file(s) have to be sent based on a set schedule.


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: