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

tar a directory and send it to netcat
tar's directory and sends to netcat listening on port 10000 On the client end: netcat [server ip] 10000 | tar xfvz - This will send it over the network and extract it on the clients machine.

Get fully qualified domain names (FQDNs) for IP address with failure and multiple detection

Change the default editor for modifying the sudoers list.
On Ubuntu, the default editor for visudo is nano. To change the editor to something else (e.g., vi) use this command.

Displays the number of unread messages on your gmail at the top right corner of your terminal
Checks your gmail account every 30 seconds and display the number of new messages in the top right corner of the terminal. A kind of CLI "Gmail notifier" if you will. :-) This is a mashup of http://www.commandlinefu.com/commands/view/7916/put-a-console-clock-in-top-right-corner and http://www.commandlinefu.com/commands/view/3386/check-your-unread-gmail-from-the-command-line

Determine whether a CPU has 64 bit capability or not
Check if you have 64bit by looking for "lm" in cpuinfo. lm stands for "long mem". This can also be used without being root.

Convert seconds to [DD:][HH:]MM:SS
Converts any number of seconds into days, hours, minutes and seconds. sec2dhms() { declare -i SS="$1" D=$(( SS / 86400 )) H=$(( SS % 86400 / 3600 )) M=$(( SS % 3600 / 60 )) S=$(( SS % 60 )) [ "$D" -gt 0 ] && echo -n "${D}:" [ "$H" -gt 0 ] && printf "%02g:" "$H" printf "%02g:%02g\n" "$M" "$S" }

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

Flush and then immediately start watching a file
This is useful for keeping an eye on an error log while developing. The !^ pulls the first arg from the previous command (which needs to be run in a sub-shell for this shortcut to work).

ignore hidden directory in bash completion (e.g. .svn)
add it in ~/.bashrc install bash-completion

Matrix Style
Same as above but slooooow it down


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: