[F] TidBITS  / TidBITS  / TidBITS Talk  /

BBEdit 8.7.1 Adds Features, Fixes Bugs, Saves Data

[roller.gvqovgf]roller.gvqovgf (apparently) - 07:21am Nov 16, 2007 PST
via email

Regarding the BBEdit Backups folder containing over 17,000 files
dating back to 2004, ...

... I wrote a little shareware tool that can be set up to manage
folders like this, such as the download folder or the trash itself.

The tool will watch such folders and (re)move only items that have
been there for longer than, say, a month (you pick your own
folder-specific "grace period"). Older files are deleted or trashed
- unless they were modified in which case they will stay for another
month.

http://www.tredje.se/trashlater.php

/Eric


Mark as Read
  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages

Lewis Butler (apparently) - Nov 17, 2007 5:13 am (#1 Total: 1)  

Reply to this message
via email  

Photo of Author
Posts: 1125
Re: BBEdit 8.7.1 Adds Features, Fixes Bugs, Saves Data

On 16-Nov-2007, at 07:21, roller.gvqovgfmailnull.com wrote:
> Regarding the BBEdit Backups folder containing over 17,000 files
> dating back to 2004, ...
>
> ... I wrote a little shareware tool that can be set up to manage
> folders like this, such as the download folder or the trash itself.
>
> The tool will watch such folders and (re)move only items that have
> been there for longer than, say, a month (you pick your own
> folder-specific "grace period"). Older files are deleted or trashed
> - unless they were modified in which case they will stay for another
> month.

You can also do this with a straight-forward crontab using find.

I believe the syntax is

find /path/to/backups -mtime +30d -exec rm {} \;

which will find all the files older than 30 days in the path and
remove them. Of course, it might be good to see what you are deleting
first:

find /path/to/backups -mtime +30d -ls

The syntax I find to be backwards. +30d means NOT modified in the
last 30 days. Saying -30d would be files that WERE modified in the
last 30 days.

Of course you could say +10h +8m or even +6w (6 weeks).




  OutlineAll MessagesOlder MessagesOldest MessagesNewest MessagesNewer Messages


 [F] TidBITS  / TidBITS  / TidBITS Talk  / BBEdit 8.7.1 Adds Features, Fixes Bugs, Saves Data




Add a message

To add a message to this discussion, you must be a registered user. Enter your email address below. If you have an account associated with the email address you enter, you will be prompted for your password. If not, you'll be able to create a new account with no fuss.

Enter your email address:

Submit