Commands by tehdog (3)

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

mail with attachment
An easy one but nice to keep in mind.

Rename files in batch

Reclaim standard in from the tty for a script that is in a pipeline
This will grab the controlling tty regardless of what STDOUT and STDERR are doing.

Check if *hardware* is 32bit or 64bit
This command tell you if your hardware is 32 or 64 bits even if you install a 32bits OS on a 64 bits hardware. If your distro don't support the -q switch, try doing : $ grep &>/dev/null '\' /proc/cpuinfo && echo 64 bits || echo 32 bits

take a look to command before action
add |sh when you agree the list, I often use that method to prevent typos in dangerous or long operations

List your installed Firefox extensions

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Replace spaces in filenames with underscores

Colorized grep in less
Get your colorized grep output in less(1). This involves two things: forcing grep to output colors even though it's not going to a terminal and telling less to handle those properly.

Simple word scramble
enlubtsqyuse $ cat /tmp/out subsequently


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: