Commands by ntropia (5)

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

create a nicely formatted example of a shell command and its output
Shell function which takes a bash command as its input, and displays the following formatted output: EXAMPLE: command OUTPUT: output from command

Show latest changed files

Remove old kernel packages

Rotate a set of photos matching their EXIF data.
You need jhead package.

Poor man's ntpdate

check open ports without netstat or lsof

Show every subdirectory (zsh)

Convert a single-page PDF to a hi-res PNG, at 300dpi
If you skip this part: $ -density 300x300 you'll get a very lo-res image.

bash: hotkey to put current commandline to text-editor
* in bash-shell You can capture the current commandline to a text-editor: * simply press: CTRL+x+e * Your current commandline will pe put into Your default text-editor (export EDITOR=vim)

Display screen window number in prompt
Add this to your $HOME/.bashrc file. It will only set this prompt if it is running inside screen ($WINDOW var is set) Looks like this... $ [email protected]:~[2]$


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: