> find /backup -mtime +0 -delete Command worked. So 7 days than what do I do to delete old files.
Example: find /backup -mtime +6 -delete ? Thanks... On Wed, Sep 24, 2014 at 5:49 PM, Martin Steigerwald <mar...@lichtvoll.de> wrote: > Am Mittwoch, 24. September 2014, 17:29:22 schrieb Gokan Atmaca: >> Within a directory backup "tar.gz" files you want to delete older than 1 >> day. >> >> I'm doing this as follows. But do not be. >> >> find /backup/ +1 -delete -mtime >> >> Can you help? > > find /backup -mtime +0 -delete > > find counts days as integers. More than 1 day in integer is everything from > day > 2 onwards. > > (yes thats crazy, but that is how find calculates it. > > Use -ls instead of -delete for a test run. > > Ciao, > -- > Martin 'Helios' Steigerwald - http://www.Lichtvoll.de > GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 > > > -- > To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: https://lists.debian.org/26638004.6Kn25MoDr0@merkaba > -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/cahg8tebmyftzh8zbytiwbkbnm5fxjxab7yp-a0tzh+szt7g...@mail.gmail.com