[LUAU] RE: How do you delete over 500,000 files in a directory
Hawaii Linux Institute
wp at HawaiiLinux.us
Thu Nov 3 20:39:02 PST 2005
Jim Thompson wrote:
> You're going to be hitting 'y' for a long time. Lets say you can get
> 10/second, thats 50,000 seconds, or the better part of 12 hours.
I will always use the rm command with ultimate care, especially when
removing a large number of files. Typically I use the mv command (to a
dump directory) instead (as the first stage of a two-stage process):
for i in m*; do mv m* ~/dump; done
Thereafter, if things look OK, use the rm -rf ~/dump command to remove
all the files (second stage). This process is reversible. If anything
screws up, you can always move the files back. Wayne
More information about the LUAU
mailing list