Commands by huazhihao (11)

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

Kill a process by its partial name
pkill is a standard command and kills processes Byte part of their name.

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

move all files older than 60 days to a folder

Preview of a picture in a terminal
This command allows you to see a preview of a picture via the terminal. It can be usefull when you are ssh'ing your server without X-forwarding. To have en example of the output you can get with this command see http://www.vimeo.com/3721117 Download at http://inouire.net/image-couleur.html Sources here: http://inouire.net/archives/image-couleur_source.tar.gz

list files recursively by size

Silently deletes lines containing a specific string in a bunch of files
This command will find all occurrences of one or more patterns in a collection of files and will delete every line matching the patterns in every file

Filter out all blank or commented (starting with #) lines

Converts uppercase chars in a string to lowercase
Another alternative is to define a function: lower() { echo ${@,,} } lower StrinG

list files in mtime order
Simple but useful; list files in the current directory in mtime order. Useful if you've been working on something and then take a day or two off.

Display a markdown file in a new tab in firefox


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: