Commands by pixelbeat (2)

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

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 .

Dump the root directory to an external hard drive
This will compress the root directory to an external hard drive and split it to parts once it reaches the 4 Gigs file system limit. You can simply restore it with: $ restore ivf /media/My\ Passport/Fedora10bckup/root_dump_fedora

Ping all hosts on 192.168.1.0/24
Will report back IP address's of all hosts that are UP.

Look for English words in /dev/urandom
Little faster alternative.

Dock Thunderbird in system tray and hide main window
Dock Thunderbird in system tray and hide main window. Very useful for startup scripts. Of course you can dock any app of your choice.

Colored diff ( via vim ) on 2 remotes files on your local computer.
You can use $ vim scp://[email protected]//file too in a simple case.

get all Amazon cloud (amazonws etc) ipv6 subnets

fetch all revisions of a specific file in an SVN repository
Manages everything through one sed script instead of pipes of greps and awks. Quoting of shell variables is generally easier within a sed script.

Convert ascii string to hex
If you're going to use od, here's how to suppress the labels at the beginning. Also, it doesn't output the \x, hence the sed command at the end. Remove it for space separated hex values instead

Open a file in a GTK+ dialog window
I use zenity because it's a rewrite of gdialog and also replaces gmessage and has more useful options. Using --text-info allows you to select and copy the text to your clipboard. To see a file in a list dialog: cat /etc/passwd | zenity --width 800 --height 600 --list --column Entries If you don't have zenity, you'll have to download it via apt-get install zenity, etc.


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: