# 2017-07-11 Since some years I have a subdomain share.creal.de, which is basically just this nginx configuration: server { listen 80; server_name share.creal.de; root /home/michi/www/share; location / { root /home/michi/www/share; index index.html; add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive"; } location /protected { root /home/michi/www/share/; index index.html; auth_basic "Restricted"; auth_basic_user_file /home/michi/www/share/protected/.htpasswd; } So whenever I want to quickly share something with somebody, I just scp the file into www/share/ and it is immediately available as a statically served file. This is quite handy and I use it very often. But of course over time this folder got a messy garbage heap. So recently I have added another subdomain where I share files: tmp.creal.de. It is set up in the same way, but there is one difference: each morning a cronjob runs and removes files which are older than 31 days. 40 6 * * * find /home/michi/www/tmp/ -type f -mtime +31 -delete Note: At first I had `find ... -type f -mtime +31 | xargs rm`, but then I stumbled upon the -delete flag of find, which basically has the advantage that find deletes all files in one rush at the end. With the xargs version there would be a large overhead, since a lot of xargs processes might be spawned, depending on how many files are found.