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

distribution specific information

Open Remote Desktop (RDP) from command line having a custom screen size
This example uses xfreerdp, which builds upon the development of rdesktop. This example usage will also send you the remote machine's sound.

Clean pacman cache in arch linux, manjaro linux
If not success clean cache and try again Code: [Select]

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Comment current line
This should work with different locales. Another post reports

Create incremental snapshots of individual folders using find and tar-gzip
Creates an incremental snapshot of individual folders.

save date and time for each command in history
for the change stay in your history file , export command by writing it into your .bashrc

recursive search and replace old with new string, inside files
Search and replace recursively. :-) Shorter and simpler than the others. And allows more terms: replace old new [old new ...] -- `find -type f`

Test file system performance
You need bonnie++ package for this. More detail than a simple hdparm -t /dev/sda would give you. the -d is the directory where it performs writes/reads for example I use /tmp/scratch with 777 permissions Bonnie++ benchmarks three things: data read and write speed, number of seeks that can be performed per second, and number of file metadata operations that can be performed per second.

Better git diff, word delimited and colorized
I've been using colordiff for years. wdiff is the new fav, except its colors. Word delimited diffs are more interleaved, easing the chore of associating big blocks of changes.


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: