On 1/3/07, Amos Shapira <[EMAIL PROTECTED]> wrote:
On 03/01/07, Penedo <[EMAIL PROTECTED]> wrote:

> readlink -fe link | xargs  -0r rm -rf
>

Correction to the above - apparently xargs waits for "\0" in order to
terminate its input,

Only because you're using the -0 flag.

      --null, -0
             Input  filenames  are terminated by a null character
instead of by whitespace, and the quotes and backslash are not special
(every character is taken literally).
             Disables the end of file string, which is treated like
any other argument.  Useful when arguments might contain white space,
quote marks,  or  backslashes.   The
             GNU find -print0 option produces input suitable for this mode.


try

readlink -fe link | xargs  -r rm -rf

(I can't test this because the only machine I have access to right now
doesn't support the -e flag to readlink)
(This is also going to destroy the ability to handle whitespace in
filenames though, so you probably don't want to do this.)

so maybe the following is more appropriate:

$ (readlink -fen link ; echo -e \\0) | xargs  -0r rm -rf

--Amos
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html




--
There is nothing more worthy of contempt than a man who quotes himself
- Zhasper, 2004
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to