Re: Delete 4 million files
Chris Davies wrote:
> Tzafrir Cohen <tzafrir@cohens.org.il> wrote:
>> At this point I wanted to write "well, one thing you you can optimize
>> away is the sorting of the 4M files that find does. To disable it, use
>> -". But I could not find such an option.
>
> That's because find doesn't sort. It generates the files in directory
> entry order. Proof:
>
> mkdir /tmp/t
> cd /tmp/t
> touch a
> touch d
> touch c
> touch b
> find . -print
>
> I'll leave it to you to discover why the files aren't (necessarily)
> printed in the order they were created.
>
> Chris
Just curious - why would you use sort before deleting something?
regards
Reply to: