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

Avoid a cluttered download folder by using /tmp System
First thing I do when I get a new system is to redirect downloads from ~/Downloads to /tmp.

The advantage with this adjustment is that in /tmp files older than a week is automatically deleted (and at every restart). Almost all files I download don't need to be stored, for example:

1. Installers. Run the installer (or dmg) from /tmp and then forget about it and it is automatically deleted within a couple of days.

2. PDFs I just want to read (or possibly print) once.

3. Templates, e.g. expense reports and similar (typically .doc or .xls). I download it, fill it in, generate a pdf and e-mail to the appropriate recipient. No need to keep the original template.

4. Torrents. Download the torrent, add it to your torrent client and then there is no need to keep the original torrent file around anymore. Besides, a lot of the files I download using torrents I just "use" them once so they can be also be downloaded to the same folder as the torrent is stored in, that is /tmp.

If I ever need a file that has been deleted from /tmp I just go to the browsers download history and download it again. Happens me maybe once or twice/year. So much easier than trying to find a file among hundreds of randomly named files in the Download folder.


I also always drag /tmp to the sidebar in the Finder and use it for - ta-da - temporary storage of files I work with briefly. Then I never need to cleanup my Downloads or Documents folder ending up in situations where "Hmm, what is this six months old file? Should I keep it or not?". If I put it in /tmp I know that

The very few downloads I want to store more permanently I just select Save as… when I click the download link and directly store them where they are supposed to go.

I just wished I could change the download folder for applications such as Bluetooth receive file, Skype, Mail.app etc. They still fill up my download folder in a very useless way.
    •    
  • Currently 2.42 / 5
  You rated: 2 / 5 (12 votes cast)
 
[10,674 views]  

Avoid a cluttered download folder by using /tmp | 7 comments | Create New Account
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: patpro on Jan 08, '14 06:40:54AM

If I'm not mistaken, daily /tmp cleanup is handled by periodic(5), through the execution of periodic script /etc/periodic/daily/110.clean-tmps.

periodic(5) is a fully configurable system. It allows you to tweak settings available in /etc/defaults/periodic.conf. You just have to create an empty /etc/periodic.conf file, and add your custom settings, like for example:

daily_clean_tmps_dirs="/tmp /Users/foo/Downloads"

Quite simple, indeed, but require proper testing (I'm using this on FreeBSD, mainly).

---
http://www.patpro.net/



[ Reply to This | # ]
Avoid a cluttered download folder by using /tmp
Authored by: Strod on Jan 08, '14 07:07:36AM
Furthermore, you can create a shell script in /etc/daily.local to execute whatever crazy maintenance task you want performed every day. Same goes for weekly and monthly tasks.

[ Reply to This | # ]
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 | # ]
Avoid a cluttered download folder by using /tmp
Authored by: astack on Jan 08, '14 06:52:24AM

This is similar to what I do as well, I make the Downloads folder a symbolic link to my Desktop folder and then periodically clear this out. However, I still have to look at that "Downloads" icon sitting in my Finder and terminal windows. What I would like is a way to remove that completely and for the OS to just use the Desktop (or /tmp or whatever) as its default download location without forcing me to have something called "Downloads". It seems like you could do this by editing the file called "/System/Library/CoreServices/SystemFolderLocalizations/en.lproj/SystemFolderLocalizations.strings", which I think is a plist format file that contains the reference to a "Downloads" entry. But there must be another reference to it somewhere because editing this alone does not cause the Downloads directory to stop being recreated.

Edited on Jan 08, '14 06:53:30AM by astack



[ Reply to This | # ]
Avoid a cluttered download folder by using /tmp
Authored by: DavidRavenMoon on Jan 08, '14 06:30:15PM

I just delete things from my downloads folder. If I didn't delete it, then I want to keep it there.
Torrents get moved to the trash when they are added to Transmission.
I don't download PDFs unless I want to keep them. Most can be viewed in Safari.
Installers I sometimes keep. Otherwise I trash them right after installing, or a day or two later.
I don't see why this is so hard as to make it automated. :)

---
iMac 2.93 GHz Core 2 Duo, 8GB, 1TB, Mac OS X 10.9.1

www.sgd-lutherie.com



[ Reply to This | # ]
Avoid a cluttered download folder by using /tmp
Authored by: wgscott on Jan 08, '14 07:50:03PM

You can have absolutely everything download to /tmp by replacing your downloads folder with a symbolic link to /tmp



[ Reply to This | # ]
Bluetooth, Skype, et al.
Authored by: magnamous on Jan 24, '14 11:14:52PM
I just wished I could change the download folder for applications such as Bluetooth receive file, Skype, Mail.app etc. They still fill up my download folder in a very useless way.
Why can't you? I've done that before.

Bluetooth: System Prefs --> Sharing --> Bluetooth Sharing --> Folder for accepted items:

Skype: Preferences --> General --> Save files in:

Mail: Preferences --> General --> Downloads folder:

[ Reply to This | # ]