Commands using du (244)

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

Change a specific value in a path
Awk replaces the value of a specific field while retaining the field separator "/" .

GRUB2: set Super Mario as startup tune
I'll let Slayer handle that. Raining Blood for your pleasure.

Stripping ^M at end of each line for files

listen to an offensive fortune
or replace "espeak" with "festival --tts" if you like festival better when your buddy leaves his computer unlocked use "crontab" or "at" to play at some time that would be most embarassing (during his next sales presentation) $ echo "fortune -o | espeak" | at now + 30 minutes of course you can exclude the "-o" for non offensive fortunes, or if you don't have offensive fortunes installed

Batch Convert SVG to PNG (in parallel)
Convert some SVG files into PNG using ImageMagick's convert command. Run the conversions in parallel to save time. This is safer than robinro's forkbomb approach :-) xargs runs four processes at a time -P4

Video Google download
Download google video with wget. Or, if you wish, pass video URL to ie mplayer to view as stream. 1. VURL: replace with url. I.e. http://video.google.com/videoplay?docid=12312312312312313# 2. OUPUT_FILE : optionally change to a more suited name. This is the downloaded file. I.e. foo.flv # Improvements greatly appreciated. (close to my first linux command after ls -A :) ) Breakedown pipe by pipe: 1. wget: html from google, pass to stdout 2. grep: get the video url until thumbnailUrl (not needed) 3. grep: Strip off everything before http:// 4. sed: urldecode 5. echo: hex escapes 6. sed: stipr of tailing before thumbnailUrl 7. wget: download. Here one could use i.e. mplayer or other...

list processes with established tcp connections (without netstat)
Uses lsof to list open network connections (file descriptors), grepping for only those in an established state

Arguments too long

Ping all hosts on 192.168.1.0/24

backup a directory in a timestamped tar.gz
creates a tar.gz with a name like: backup20090410_173053.tar.gz of a given directory. this file was made 10 April 2009 at 5:30:53pm see date's man page to customize the timestamp format


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: