Commands using sleep (289)

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 used disk space:

google tts

oneliner to transfer a directory using ssh and tar
this will tar/send/untrar a whole directory.

Diff XML files
Diffs two xml files by formatting them first using xmllint and then invoking diff. Usage: diffxml XMLFile1 XMLFile2

check open ports without netstat or lsof

Apply permissions only to files
To apply only to dirs: $ chmod 755 $(find . -type d) Use -R parameters for recursive walk.

Short and elegant way to backup a single file before you change it.
Remember to backup everything before changing it so you can restore all to normal.

Remove orphaned dependencies on Arch
-Qdt Lists dependencies/packages which are no longer required by any packages -q Output only package name (not the version number) -R Remove package(s) Rest is self-explanatory. I just started out with Arch - so if there is any better/standard method to achieve the same - please suggest.

Quickly share code or text from vim to others.
Sprunge.us is a code/text sharing site like pastebin, but it is easy to post stuff from the command line. $ How it works: $ :w !command In vim, w writes the current tab to a file when a filename is given afterwards, but if !command is given, the output is piped to the stdin of command. $curl -F "sprunge=

Show permissions of current directory and all directories upwards to /
Useful if a different user cannot access some directory and you want to know which directory on the way misses the x bit.


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: