piyocpy
10-18-2002, 12:36 AM
I don't know how to write a shell script program that can get all
the disk/file usage of each user and list them out.
eg. when enter ./eg.sh -s -r *
it can list out:
total usage user
2340231 aaa
1232132 bbb
1123343 ccc
It can accept parameters like -h (help), -s (sort on size of directory), -d (sort alphabetically on directory), -r (sort in reverse)
It can accept more than one directory on command line. All directories can be sorted together.
Can anyone write an example shell script here? or any suggestion?
Thx a lot !!!
the disk/file usage of each user and list them out.
eg. when enter ./eg.sh -s -r *
it can list out:
total usage user
2340231 aaa
1232132 bbb
1123343 ccc
It can accept parameters like -h (help), -s (sort on size of directory), -d (sort alphabetically on directory), -r (sort in reverse)
It can accept more than one directory on command line. All directories can be sorted together.
Can anyone write an example shell script here? or any suggestion?
Thx a lot !!!