Summary: probably over a million files to delete

From: Gold Sun (goldsun8_at_yahoo.com.sg)
Date: 08/27/05

  • Next message: Gold Sun: "mailx mails not sent out or not arriving?"
    Date: Sat, 27 Aug 2005 20:09:52 +0800 (CST)
    To: sunmanagers@sunmanagers.org
    
    

    Thanks all.
     
    Some of the replies :
     
    A couple replies say I will still some time to complete the
     deletion, so I probably can do
     "nohup <delete command> &
    to let it run by itself in the background.
     
    As I need to remove files older than 180 days, I chose :
     
    cd <dir where files exist>
    find . -xdev -type f -mtime +180 -exec rm {} \+ &

    ==========
     
    Other replies :
     
    Mount the filesystem with logging on. You can do this without
    unmounting
    the filesystem
    mount -o remout,logging <dev> >filesystem>
     
    -----------
     
    cd <directory>
    find . -name '*2004*12' -o -name '*2004*11*' -o .... | xargs rm -f &
     
    -----------
     
    1. find . -exec rm {} \;
    2. for x in `ls`; do rm $x ; done

    -----------
     
    You ran into a limitation on the ability of the shell. I have run into
    similar problems in the past. Here is how I worked around it. It
    requires the use of perl. It will remove all files within the
    directory
    where executed. Test to verify for yourself how it works.
      ls | perl -ne 'chomp; unlink'

     

                    
    ---------------------------------
    Meet your soulmate!
     Yahoo! Asia presents Meetic - where millions of singles gather
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Gold Sun: "mailx mails not sent out or not arriving?"

    Relevant Pages

    • Konqueror take long time to show the filesystem
      ... Galeon or Opera and enter / the filesystem is shown ... So there must be something with the setup of Konqueror?? ... Thankful for replies. ...
      (alt.os.linux.suse)
    • Re: [SLE] Still cannot update beyond original KDE3.3--Exhausted and Depressed
      ... Open Yast, Click on Software, ... to attach the contents of the disks to the existing filesystem. ... mount point is the directory in the filesystem you will attach those ... > Like perhaps give the the exact command and where to ...
      (SuSE)
    • Re: XFS and Power Failures [Was: Linux filesystems]
      ... to hose the filesystem to the point it couldn't mount. ... Vanilla XFS with noatime,notail like basic mount options. ... I dropped to fsck command line. ...
      (Debian-User)
    • Re: How to set /etc/fstab again after system has started
      ... Is there another file besides /etc/fstab that I can use for the mount ... want a filesystem automatically mounted when the system boots. ... at boot time to indicate which filesystems were to be mounted. ... It listed data needed for a "mount -a" command. ...
      (comp.os.linux.misc)
    • Re: fstab and scsi
      ... You can label your filesystem using the e2label command: ... In case of duplicate filesystem labels, the first one found by the ... Strictly speaking the mount point directory is not required to be ...
      (linux.redhat)