Commands by wuseman1 (117)

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

Print only the odd lines of a file
NR%2 == 1 on odd lines and 0 on even lines

Edit 2 or more files in vim using vim -d
Is this not the same

fetch all revisions of a specific file in an SVN repository
exported files will get a .r23 extension (where 23 is the revision number)

Prints any IP out of a file

Download an entire static website to your local machine
Very nice command when you want to download a site locally to your machine, including images, css and javascript

Compare a remote dir with a local dir
You can compare directories on two different remote hosts as well: $ diff -y

save date and time for each command in history
Date-time format: YYYY-MM-DD HH:MM:SS

Keep one instance of an irc chat client in a screen session
This command attempts to attach to existing irssi session, if one exists, otherwise creates one. I use "irc" because I use different irc clients depending on what system I am working on. Consistency is queen.

Make changes in .bashrc immediately available

Day of the week of your birthday over the years.
Do you ever want to know which day of week was your birhday! Now you can check that with this command, just set your birh date at the beginning (My bday in the example) and the dates will be revealed. ;)


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: