home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
norge.freeshell.org (192.94.73.8)
/
192.94.73.8.tar
/
192.94.73.8
/
pub
/
computers
/
3b2
/
largest
< prev
next >
Wrap
Text File
|
1985-05-23
|
435b
|
27 lines
# @(#)largest 1.2 /sccs/src/cmd/sadmin/shell/s.largest
# Find largest files under the given directory.
#! chmod +x ${file}
if [ x$1 = x ]
then
d=.
else
d=$1
fi
if [ x$2 = x ]
then
b=10
else
b=$2
fi
echo " the ${b} largest files under ${d}"
a="`expr 0${b} "*" 10`"
cd ${d}
du -a |
sort -bnr +0 -1 |
sed -n 1,0${a}'s:^[0-9]* \./:ls -ldsu :p' |
sh - |
grep -v '^ *[0-9][0-9]* d' |
sed -n 1,0${b}p |
sort -bnr +5 -6