File: approx.cron.weekly

package info (click to toggle)
approx 5.10-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 340 kB
  • sloc: ml: 2,220; sh: 42; makefile: 32
file content (15 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Remove old files from the approx(8) cache

# Location of the cache
cache=/var/cache/approx

# Maximum age of files to keep, in days
max_age=1000

# Remove old files
find $cache -type f -mtime +$max_age -delete -print

# Remove empty files and directories
find $cache -empty -delete