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

Find where a kind of file is stored
In this case searches for where .desktop files are stored. The resulted is a sorted list of the top directories containing such files.

find all file larger than 500M
Greater than 500M and sorted by size.

find files containing text
I find this format easier to read if your going through lots of files. This way you can open the file in any editor and easily review the file

convert ascii string to hex
Even adds a newline.

remove all spaces from all files in current folder

kill all foo process
Kill all processes with foo in them. Similar to pkill but more complete and also works when there is no pkill command. Works on almost every Linux/Unix platform I have tried.

View all new log messages in real time with color

run last command with root
you will be sad after you run a command and find out it needs root, so you should run it again but with prefix sudo. so this line is to make it simple. just 'sudo !!'

Remove annoying files from recently extracted zip archive
Inspired by http://www.commandlinefu.com/commands/view/2573/remove-all-files-previously-extracted-from-a-tar.gz-file. .... yet for zip files

Replicate a directory structure dropping the files
Here is how to replicate the directory structure in the current directory to a destination directory (given by the variable DESTDIR), without copying the 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: