Commands by tsaavik (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

Show current working directory of a process

Synchronize date and time with a server over ssh
using -u is better for standardizing date output and timezones, for servers in different timezones.

Remove all unused kernels with apt-get
TIMTOWTDI

Rename all .jpeg and .JPG files to have .jpg extension
the "i" controls case sensitiveness. It's slightly inefficient since it uselessly renames .jpg to .jpg, but that's more than compensated by launching only one process instead of two, besides being shorter to write.

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.

Terminate a frozen SSH-session
A key sequence for terminating a frozen session. Full sequence on a swedish keyboard: [ENTER] [ALTGR] tilde [SPACE] dot

Simulate typing
this also generates errors (change 4 to higher number for more mistakes)

compare two Microsoft Word documents
http://meld.sourceforge.net/ http://www.winfield.demon.nl/

Show database sql schema from Remote or Local database
After ssh into server, run this command to show all the table structure and schema.

Send remote command output to your local clipboard
This command will copy command's output into your local clipboard


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: