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

An alias to select a portion of your desktop and save it as an image.

list block devices
Shows all block devices in a tree with descruptions of what they are.

remove files and directories with acces time older than a given date
touch a dummy file with the specified date, then use find with -anewer .

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Copy files based on extension with recursive and keeping directory structure
Copy file theo phần mở rộng c? đệ quy v? giữ nguy?n cấu tr?c thư mục Replace "jar" by extension which you need.

Remove all unused kernels with apt-get
This should do the same thing and is about 70 chars shorter.

Watch a movie in linux without the X windows system.

create tar archive of files in a directory and its sub-directories
creates a compressed tar archive of files in /path/foo and writes to a timestamped filename in /path.

Git Tree Command with color and tag/branch name

Search for a string inside all files in the current directory
This is how I typically grep. -R recurse into subdirectories, -n show line numbers of matches, -i ignore case, -s suppress "doesn't exist" and "can't read" messages, -I ignore binary files (technically, process them as having no matches, important for showing inverted results with -v) I have grep aliased to "grep --color=auto" as well, but that's a matter of formatting not function.


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: