14 Jun
2001
14 Jun
'01
19:16
Þann fimmtudagur 14 júní 2001 18:52 skrifaðir þú:
Hi everybody, thank's for the help. i've now an other problem : i want the script to tell me when a directory has a size up to 500M. i can't get it with du -hs /mnt/charlie/backup because it shows size of the directory and the name.
here is the code i've done : for size in ( du -hs /mnt/charlie/backup ); do if [ $size = 500M ]; then echo Need to rip a CD fi done
thank you for help Charlie Ti
for x in directory1/. directory2/. directory3/. do let Y="`du -ls $x | awk '{print $1/1024}' | sed 's/\..*//'`" if [ $Y -gt 499 ] then echo "Burn CD of $x" fi done That should tell you to burn all 500Mb directories and larger... -tosi