Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

tm-cleanup.sh: A Shell Script Now Featuring an Interactive Interface

DZone's Guide to

tm-cleanup.sh: A Shell Script Now Featuring an Interactive Interface

A (very) brief tutorial on using the interface just introduced to remove any unneeded backups. And the backups to the backups. And the backups to those backups...

Free Resource

xMatters delivers integration-driven collaboration that relays data between systems, while engaging the right people to proactively resolve issues. Read the Monitoring in a Connected Enterprise whitepaper and learn about 3 tools for resolving incidents quickly.

More than two years ago I wrote tm-cleanup.sh, a shell script to delete Time Machine backups. During this time it has proven very useful to me, and it's been serving its purpose as it is, with barely any modification at all.

However, I've been asked for help and clarifications quite a number of times by non-tech-savvy users who had some issues using the CLI. For this reason I thought that adding an interactivedialog-based interface to this script may help people "visualise" what's going on when running tm-cleanup.sh.

The new interface has been added in v. 2.0.0, and can be opened by simply issuing the following command with no options:

 $ sudo tm-cleanup.sh 

The interactive interface opens a menu where the backup deletion operation can be triggered. The user is then presented the list of existing Time Machine backups and they can be individually selected and then deleted. Here's a screenshot of the interface showing the existing backups:

The documentation of the repository describes in detail both interfaces. I hope people will find it useful.

3 Steps to Monitoring in a Connected Enterprise. Check out xMatters.

Topics:
Performance ,backup ,shell script ,interface ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}