for dir in */; do
size=$(du $dir | awk '{print $1}')
echo $size
if [ "$size" > "500000" ]; then
echo blabla
fi
done
for dir in */; do
size=$(du $dir | awk '{print $1}')
echo $size
default=500000
if [ $size -gt $default ]; then
echo blabla
fi
done
#!/bin/sh
for dir in $(find ./ -type d -maxdepth 1 -print0 | xargs -0 du -d 0 | awk '{if ($1 >= 500000) print substr($0, index($0,$2))}')
do
echo $dir
done
#!/bin/sh
basepath="/base/path/"
for dir in "$(find $basepath -type d -mindepth 1 -maxdepth 1 -print0 | xargs -0 du -d 0 | awk '{if ($1 >= 500000) print substr($0, index($0,$2))}')"
do
echo "$dir"
done
We use essential cookies to make this site work, and optional cookies to enhance your experience.