@@ -7,21 +7,30 @@ tm-cleanup.sh
77-------------
88
99` tm-cleanup.sh ` is a ZSH script that lists the completed Time Machine snapshots
10- and deletes those that are oldest that a specified number of days. The default
11- threshold is 30 days.
10+ and deletes those that satisfy the specified criteria. Two types of deletion
11+ criteria exist:
12+
13+ * By date: snapshots that are older than a specified number of days are
14+ deleted. The default threshold is 30 days.
15+
16+ * By number: a maximum number of snapshots is retained and oldest snapshots
17+ are deleted.
18+
19+ Only one deletion criteria can be specified.
1220
1321The syntax of ` tm-cleanup.sh ` is the following:
1422
1523```
16- $ tm-cleanup.sh [ -d days] [-f] [-x]
24+ $ tm-cleanup.sh ( -d days | -n number) [-f] [-x]
1725$ tm-cleanup.sh [-h]
1826```
1927
2028where
2129
22- * By default backups older than 30 days will be deleted. If ` -d ` is
23- speficied, backups older than the specified number of days will be deleted.
24- ` days ` is an unsigned positive integer number.
30+ * If ` -d ` is specified, backups older than the specified number of days will
31+ be deleted. ` days ` is a positive integer number.
32+ * ` -n ` specifies the number of backups to retain. ` number ` is a positive
33+ integer number.
2534 * By default, ` tm-cleanup.sh ` exits and prints an error message if a Time
2635 Machine backup is currently in progress. ` -f ` forces the backup deletion
2736 concurrently.
@@ -30,18 +39,17 @@ where
3039 be performed without actually performing any.
3140
3241This script * never* deletes the latest snapshot, no matter the value of the
33- ` days ` option .
42+ ` -d ` or ` -n ` options .
3443
3544Installation
3645------------
3746
3847The scripts require no installation: they can be downloaded and run from any
39- location.
40- However, this repository provides an installation script that creates
41- symbolic links to ` /usr/local/bin ` , a directory which is included by default
42- in the ` ${PATH} ` of any OS X user.
43- Installing the symbolic links has the advantage of always providing the current
44- version of the scripts on the ` ${PATH} ` when the local repository is updated.
48+ location. However, this repository provides an installation script that creates
49+ symbolic links to ` /usr/local/bin ` , a directory which is included by default in
50+ the ` ${PATH} ` of any OS X user. Installing the symbolic links has the advantage
51+ of always providing the current version of the scripts on the ` ${PATH} ` when the
52+ local repository is updated.
4553
4654To install the symbolic links:
4755
@@ -74,7 +82,7 @@ Bug reports can be sent directly to the authors.
7482
7583-----
7684
77- Copyright (C) 2015 Enrico M. Crisostomo
85+ Copyright (C) 2016 Enrico M. Crisostomo
7886
7987This program is free software; you can redistribute it and/or modify
8088it under the terms of the GNU General Public License as published by
0 commit comments