OK, just replaced with xargs!
Thanks again,
-Andrea
Ashley Gould wrote:
> Andrea,
>
> using -exec instead of xargs is not working properly on the first
> call to find. It removes the directory $vg_name and all it's contents,
> but exits with status 1. die( "Couldn't $cmd" ) catches this and
> kills the script.
>
> This is something wierd about find/-exec with rm -rf:
>
> hvxen-0c:~ # find /tmp/.systemimager.2/dev/ -name "system" -type d -exec rm
> -rfv \{} \;
> removed `/tmp/.systemimager.2/dev/system/tmp'
> removed `/tmp/.systemimager.2/dev/system/var'
> removed `/tmp/.systemimager.2/dev/system/usr'
> removed `/tmp/.systemimager.2/dev/system/home'
> removed directory: `/tmp/.systemimager.2/dev/system'
> find: /tmp/.systemimager.2/dev/system: No such file or directory
> hvxen-0c:~ # echo $?
> 1
>
> The second call to find just uses rm -f. this succeeds without errors.
>
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users