Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Fast trash emptying via Unix script turned into an app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Fast trash emptying via Unix script turned into an app
Authored by: wallybear on Jul 21, '09 10:39:30AM
There's an error in the script: du returns block count (with blocks of 512 bytes), not bytes.
Use the parameter -k if you want Kb, or, better, use the -h parameter for "human readable" value (with Kb/Mb/Gb scaling).
Moreover, using the -s parameter you can omit the 'tail -1' command; so:

byts=`du | tail -1`

becomes

byts=`du -sh`


[ Reply to This | # ]
Fast trash emptying via Unix script turned into an app
Authored by: wallybear on Jul 22, '09 11:05:41AM

mmmhmm... my comment was for the main article, not an answer to the above reply.



[ Reply to This | # ]