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

Runs a command without hangups.
The improvement is that you can re-attach to the screen at a later point.

Restart Xen XAPI
Restarts the XAPI service on the host, mostly used by Xen Center. It does not affect any running VMs, just the Xen client tools that may be connected. On my list as XAPI frustratingly keeps running out of memory and getting killed off.

Remove a range of lines from a file
Deletes lines from START to END, inclusive. For example +4,10d will delete line 4, 5, ..., 10. Just like the vi command :4,10d does it.

sends a postscript file to a postscript printer using netcat

change up n directories
Change n directories up, without parameters change one up

Search for files older than 30 days in a directory and list only their names not the full path

another tweet function
This version of tweet() doesn't require you to put quotes around the body of your tweet... it also prompts you for password. It will still barf on a '!' character.

For a $FILE, extracts the path, filename, filename without extension and extension.
Useful for use in other scripts for renaming, testing for extensions, etc.

find and reduce 8x parallel the size of JPG images without loosing quality via jpegoptim

print indepth hardware info
wanna know something about your hardware? how about EVERYTHING?? then this should do ya well


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: