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

Search some text from all files inside a directory

Find the package that installed a command

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

See size of partitions as human readable
See size of partitions as human readable and get extra informations about hdd and partitions

remove repeated pairs of characters e.g. "xtxtxtxt" will become "xt"
This will remove repeated characters e.g. echo "xtxtxtxt" | sed -ru 's/(..)\1{2,}/\1/g' the output will just be "xt"

Start another instance of X via SSH

archlinux: find more commands provided by the package owning some command
uses the pkgfile command (part of the community repository), highly suggested.

Figure out what shell you're running

Find all directories on filesystem containing more than 99MB
Finds all directories containing more than 99MB of files, and prints them in human readable format. The directories sizes do not include their subdirectories, so it is very useful for finding any single directory with a lot of large files.

Mount a partition from within a complete disk dump
Suppose you made a backup of your hard disk with dd: dd if=/dev/sda of=/mnt/disk/backup.img This command enables you to mount a partition from inside this image, so you can access your files directly. Substitute PARTITION=1 with the number of the partition you want to mount (returned from sfdisk -d yourfile.img).


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: