GithubHelp home page GithubHelp logo

davosian / time-machine-cleanup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emcrisostomo/time-machine-cleanup

0.0 2.0 0.0 172 KB

ZSH scripts to clean up Time Machine backups and reduce its size

License: GNU General Public License v3.0

Makefile 10.64% Shell 89.36%

time-machine-cleanup's Introduction

Time Machine Cleanup

ZSH scripts to clean up Time Machine backups and reduce its size.

tm-cleanup.sh

tm-cleanup.sh is a ZSH script that lists the completed Time Machine snapshots and deletes those that are oldest that a specified number of days. The default threshold is 30 days.

The syntax of tm-cleanup.sh is the following:

$ tm-cleanup.sh [-d days] [-f] [-x]
$ tm-cleanup.sh [-h]

where

  • By default backups older than 30 days will be deleted. If -d is speficied, backups older than the specified number of days will be deleted. days is an unsigned positive integer number.
  • By default, tm-cleanup.sh exits and prints an error message if a Time Machine backup is currently in progress. -f forces the backup deletion concurrently.
  • -h prints the help message and exits the program.
  • -x performs a dry clean: it will print the list of operations that will be performed without actually performing any.

This script never deletes the latest snapshot, no matter the value of the days option.

Installation

The scripts require no installation: they can be downloaded and run from any location. However, this repository provides an installation script that creates symbolic links to /usr/local/bin, a directory which is included by default in the ${PATH} of any OS X user. Installing the symbolic links has the advantage of always providing the current version of the scripts on the ${PATH} when the local repository is updated.

To install the symbolic links:

$ sudo make install

To uninstall the symbolic links:

$ sudo make uninstall

To make the changes visibile in an existing ZSH session, execute this command:

$ rehash

Requirements

Since a compatible version of ZSH is bundled with OS X, these scripts have no other requirements.

Bug Reports

Bug reports can be sent directly to the authors.


Copyright (C) 2015 Enrico M. Crisostomo

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

time-machine-cleanup's People

Contributors

emcrisostomo avatar

Watchers

Dennis Staiger avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.