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


Click here to return to the 'Avoid a cluttered download folder by using /tmp' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid a cluttered download folder by using /tmp
Authored by: comodin on Jan 08, '14 11:54:39AM

i use this file: /private/etc/periodic/daily/111.clean-download

#!/bin/sh

# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/periodic.conf ]
then
. /etc/defaults/periodic.conf
source_periodic_confs
fi

if [ -d /Users/foo/Downloads ]; then
echo ""
echo "Removing old download files"
cd /Users/foo/Downloads && \
find . -type f -mtime +7 -delete >/dev/null 2>&1;
fi

---
--



[ Reply to This | # ]