RE: achive and remove old files

From: pascal francois (coppernrh_at_yahoo.fr)
Date: 01/05/05

  • Next message: Stuart Sears: "Re: runlevels"
    Date: Wed, 5 Jan 2005 22:15:21 +0100 (CET)
    To: General Red Hat Linux discussion list <redhat-list@redhat.com>
    
    

    LOL, Paul, you are in late for 11 minutes after me ;-)
    Patrick

    "Pettit, Paul" <ismanager@ccbnpts.com> wrote:
    Steve gave you a good example of how to remove the files. Try this to
    "archive" them the same way:

    find //\( -type f -a -mtime +730 \) -exec mv
    --target-directory=/// {} \;

    When doing the above be sure to have the archive dir in a different tree
    than the source. If you try to archive the old files into a dir that is
    in the source dir you will get "existing file" errors because it will
    desend down your archive dir and try to move those files too. Also note
    that moving the files will change their accessed timestamp (but not the
    modified timestamp). I'm not sure the trailing slash in
    '--targe-directory=' is needed but if your moving dirctories as well as
    files it won't hurt and is probably prudent.

    Paul Pettit
    CCB Inc.

    -----Original Message-----
    From: redhat-list-bounces@redhat.com
    [mailto:redhat-list-bounces@redhat.com] On Behalf Of Jianping Zhu
    Sent: Wednesday, January 05, 2005 9:37 AM
    To: redhat-list@redhat.com
    Subject: achive and remove old files

    S redhat 9.0
    I have a huge direcory (more than 30 GB) I want to take all the files
    and sub-dirctries which have not been modified or used for more than
    two year out of the diretory and achive it then delete them them from
    the original direcoty. Does anyone have a script to do this kind of
    work?
    Thank

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    		
    ---------------------------------
     Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
    Créez votre Yahoo! Mail
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Stuart Sears: "Re: runlevels"

    Relevant Pages

    • Re: What does this mean?
      ... On Sun, Jul 22, 2012 at 2:58 AM, Paul E Condon ... The computer is running only a home brew data processing script ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: apt-get update not working properly 11/21/03
      ... Paul ... * For God so loved the world that He gave his only begotten Son, ... To UNSUBSCRIBE, email to debian-user-request@lists.debian.org ...
      (Debian-User)
    • RE: Trouble booting fresh Core 3 install
      ... Hello Paul. ... The waterfall happens directly and almost immediately after the GRUB boot command. ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ... intended recipient is prohibited. ...
      (Fedora)
    • Re: trying to use reportbug to report the following bug
      ... > Exim should be set up and configured to provide a sendmail facility. ... BTW I tried "Reply to list" for this response (from mutt) and discovered ... Paul ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: About USB hard drives and errors
      ... Paul E Condon wrote: ... for a USB solution. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)