in reply to Unix size
In unix to get the usage of any directory we use the following command at the terminal du -sk / . In this we specify the directory of which we want the disk usage. Now consider the below code..
my ($location) = @_; print "\n".'Calculating Scan Statistics...'."\n"; my $size =0; $size= `du -sk @_`; print "$size";
Now when i use this code to access the du command it gives me the disk usage of the root directory irrespective of the directory specified . example @_=/ gives result 150002 , @_ = /usr gives same result 150002 . I want the individual disk usage of every directory ? help??
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unix size again
by tobyink (Canon) on Feb 08, 2012 at 06:51 UTC | |
by Anonymous Monk on Feb 08, 2012 at 09:10 UTC | |
by Corion (Patriarch) on Feb 08, 2012 at 09:26 UTC | |
by tobyink (Canon) on Feb 08, 2012 at 09:27 UTC | |
|
Re: Unix size again
by JavaFan (Canon) on Feb 08, 2012 at 07:51 UTC | |
|
Re: Unix size again
by Khen1950fx (Canon) on Feb 08, 2012 at 07:58 UTC | |
by JavaFan (Canon) on Feb 08, 2012 at 08:49 UTC | |
|
Re: Unix size again
by MidLifeXis (Monsignor) on Feb 08, 2012 at 13:41 UTC | |
|
Re: Unix size again
by pvaldes (Chaplain) on Feb 08, 2012 at 12:26 UTC |