RE: remove old files from dictory

From: Clark, Patricia (Clarkp_at_osti.gov)
Date: 01/04/05

  • Next message: James D. Parra: "temporary files"
    To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
    Date: Tue, 4 Jan 2005 13:22:37 -0500
    
    

    This will delete the files. You will want to run some tests using the
    -print option on a subdirectory to verify that you are indeed identifying
    and will be removing the files that you want first.

    To test:
    find <put the path of the start directory here> -ctime +730 -print

    To run:
    find <put the path of the start directory here> -ctime +730 -exec rm {} \;

    This can take quite a while. I would suggest having multiple sessions
    running on the subdirectories to reduce the time. Also, as for deleting the
    directories/subdirectories, you were not clear on whether the timestamp was
    the only deciding factor. I would make a second pass and remove only the
    empty directories with the rmdir command. Read up on the find command for
    more information. Also, make sure you have a backup of the directories
    before starting on this.

    Patti

    -----Original Message-----
    From: Jianping Zhu [mailto:jzhu@fisher.forestry.uga.edu]
    Sent: Tuesday, January 04, 2005 12:34 PM
    To: redhat-list@redhat.com
    Subject: remove old files from dictory

     OS redhat 9.0
     I have a huge direcory (more than 30 GB) I want to take all the files and
     sub-dirctries which are created more than
     two year ago out of the dicctory. 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
    

  • Next message: James D. Parra: "temporary files"

    Relevant Pages

    • Re: HP Photosmart and Epson Stylus Photo printer compatibility?
      ... The listing on linuxprinting.org has the PhotoSmart D7100, 7200 and 7400 all listed as working perfectly. ... Can anyone verify if the newer versions currently at Fry's work as perfectly as the older ones? ... model numbers to let retailers, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: P-II ASUS box wont boot another drive
      ... The BIOS does show the correct size for each drive, detecting the same geometry as printed on the drive. ... I had forgotten that you said that a 850MB drive works fine in that machine, and Etch installs. ... Write a few more files to the HD, reboot, then verify that the files haven't changed. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • Re: How to check if a DVD is damaged?
      ... To verify data on your dvd you can also use star and readcd: ... > The problem disappeared when I changed the DVD with a brand new one, ... Then I use cdck to do finer-grained testing. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • RE: how can you verify that the site you get is not a fake?
      ... browser/toolbar that deals with valid/false urls... ... On Behalf Of taharka ... how can you verify that the site you get is not a fake? ... To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list ...
      (Fedora)