Oracle database tips logo
Article categories | Blog and News Page | SQL | SQL*Plus | DBA Scripts | Standby dbs | Database Links | Techno webcasts | Oracle Magazine | Free IT Magazines | Oracle Database Hosting Companies | Site Search |
RSS
XML RSS
What is this?
AddThis Feed Button

Social Bookmarking


-- FREE --
IT Magazine
Subscriptions

Oracle Magazine Oracle Magazine Contains technology strategy articles, sample code, tips, Oracle and partner news, how-to articles for developers and DBAs

WebSite Magazine WebSite Magazine Practical advice, helpful tools and insights for website owners

Dr Dobb's Journal Dr Dobb's Journal enables coders to write the most efficient programs and help in daily programming quandaries

DM Review DM Review is recognized as the premier business intelligence, analytics and data warehousing publication
Various other Free IT magazine subscriptions
NoAdware Free Trial

NoAdware Remove
harmful
adware,
spyware,
trojans,
dialers
and worms!
- Featured ebook -

Database Normalization
by Alf Pedersen

Database Normalization ebook Understand and master how to normalize a database using methods richly documented with graphical ERD and server diagram examples

Linux du command: how to list subdirectory sizes only.


Make sure you always test this 'Linux du' script on a test server before implementing it on a production system !


I can never remember the options for checking the Linux du command so that I only see the summary of the directories, excluding the list of files.
What better way than to put up a webpage ?

 

The options as explained in the manpage are:
  • -h, --human-readable
    print sizes in human readable format (e.g., 1K 234M 2G)
  • -c, --total
    produce a grand total
  • --max-depth=N
    print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument; --max-depth=0 is the same as --summarize


Here it is :



[oracle@testserver]$du -hc --max-depth=1 .
314M    ./db1
6.0G    ./db2
12K     ./db3
12K     ./db4
6.3G    .
6.3G    total



Return from linux du back to oracle-script-tutorials