On Tuesday 28 May 2002 9:42 am, Gary Stainburn wrote:
> Hi all,
>
> Can anyone give me the one-liner to replace
>
>
> find . -type f -exec rm {} \;
>
> with
>
> find . -type f |perl -?????????
>
> to improve the speed when deleting a large squid cache


sorry, I forgot to include how far I've got.  Where's the closest I've got, 
and the output I got:

[gary@gary tmp]$ find . -type f|perl -ne 'unlink||die "cannot unlink $_: $!"'
cannot unlink ./1/a
: No such file or directory at -e line 1, <> line 1.
[gary@gary tmp]$ ll 1
total 28
-rw-rw-r--    1 gary     gary            6 May 28 09:47 a
-rw-rw-r--    1 gary     gary            6 May 28 09:47 b
-rw-rw-r--    1 gary     gary            6 May 28 09:47 c
-rw-rw-r--    1 gary     gary            6 May 28 09:47 d
-rw-rw-r--    1 gary     gary            6 May 28 09:47 e
-rw-rw-r--    1 gary     gary            6 May 28 09:47 f
-rw-rw-r--    1 gary     gary            6 May 28 09:47 g
[gary@gary tmp]$
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to