Generational backups of single file or directory, preserving extension


/ Published in: Python
Save to your folder(s)

Creates backups of "file.ext" in the form "file.Bx.ext", where Bx represents a sequential backup number from 1 (most recent) to 5 (oldest)

Put the following symbolic links in your path

ln -s path-to-this-file/age.py age
ln -s path-to-this-file/age.py sage
ln -s path-to-this-file/age.py unage

Save the code as "age.py".

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.