summaryrefslogtreecommitdiff
path: root/big
blob: 936d933a178c06bfd145344db28b78abf323c4a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12

d="."
if [[ ${1} ]]; then d=${1}; fi

if [ -z ${2} ]; then
	#du -a ${d} | sort -n -r | head -n 15
	find ${d} -type f -exec du -Sh {} + | sort -rh | head -n 20
	# use -not -path [dir]  to exlude directories
else
	#du -a ${1} | sort -n -r | head -n ${2}
	find ${d} -type f -exec du -Sh {} + | sort -rh | head -n ${2}
fi