]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
crontab.d/jobs.daily/prune-logs: follow symlink
authorSimon Ruderich <simon@ruderich.org>
Tue, 29 Apr 2014 13:46:23 +0000 (15:46 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 29 Apr 2014 13:46:23 +0000 (15:46 +0200)
find doesn't follow symlinks by default. The "/" forces it to change to
the directory even if it's a symlink.

crontab.d/jobs.daily/prune-logs

index 2678a3bbf300390faef68e66f39f90802e309fd7..9295aa936bf4a64bcbacbf661c1065197982e982 100755 (executable)
@@ -29,4 +29,4 @@ fi
 # Remove empty directories.
 rmdir "$logdir"/* 2>/dev/null || true
 
-exec find "$logdir" -type f -mtime +14 -delete
+exec find "$logdir/" -type f -mtime +14 -delete