Rotating Folder Backup Script

How do you create folder backup archives and limit the size by rotating old ones out? A common task and there are plenty of solutions. This is more or less the poor man’s solution I’m running from cron.

This script will process each sub folder of a given base directory. If there are modified files it will create a archive tar and possibly clean out old ones. The last 7-days of snapshots and each 1st of the month will be kept.


BASEDIR=/home/projects # SET THIS
BAKDIR=/home/backups # SET THIS

stamp=$(date +%Y-%m-%d)

for prj in * ; do

find "$prj" -mtime -1 -type f | grep "" >/dev/null && {
        tar cjf "$BAKDIR/${prj}_${stamp}.tar.bz2" "$prj"
        find "$BAKDIR" -name "${prj}_*" -mtime -14 -mtime +7 -not -name "*-01.*" -exec rm {} \;
        ls -sh "$BAKDIR/${prj}_"*


The script needs the bash shell and works with whitespace in directory- and filenames.

MP3 Scan + Repair

The audio repair tool to check and fix all your MP3 files.

Check and repair your MP3 audio files.

Some of your audio players might be picky or play choppy sound. Scan and fix all your MP3 files for best performance! And it's free, too!

MP3 Scan + Repair

Mouse Acceleration for OS X

Set up extended speed parameters for your mouse.

Extended mouse settings

The Mouse Acceleration PrefPane is a GUI and startup item to Richard Bentley's MouseFix.

You can set up extended speed parameters and acceleration curves for your mouse.

  • Increase mouse pointer precision
  • Speed up your mouse movement
  • Set mouse acceleration parameters
  • Full control with just two simple knobs

Mouse Acceleration for OS X

About the Author

Hi there! I'm Christian Zuckschwerdt a freelance software designer from Germany. On this blog I'd like to share some free and open source software for GNU/Linux and Apple Mac OS X.
There are also some themes and tricks for the Drupal CMS. And then the occasional hardware or gadget hack. It's all free and mostly licensed under the GPL or CC.
Write a comment or send me a mail. I love to hear from you!

About FOSS

Do you know how much free and open source software is involved in creating and delivering some basic web pages?

This blog is rendered by hexo themed with nunjucks compiled by nodejs served by apache httpd secured with openssl stored on MariaDB running on gentoo linux, edited with vim deployed by openssh, graphics done with inkscape and gimp.

triq blog
© 1999 – 2020 Christian Zuckschwerdt.
Datenschutz / GDPR