On Fri, Jan 14, 2005 at 04:10:49AM +0100, Marco wrote:
> I noticed that the previous re also excluded files and directories
> whose name contained "Makefile", "admin", ... etc. I wrote this to
> ensure that
> - the whole name is "admin" or
> - the name is something like "foo/admin"
>
> lftp -e "mirror -vvv -R -L --delete-first --parallel=3 -x
> \"((/|^)Makefile$$|(/|^)bbclone$$|(/|^)db$$|(/|^)trash$$|(/|^)scansioni$$|(/|^)admin$$|(/|^)TODO$$|(/|^).*~$$|(/|^)_.*$$)\";quit"
> -u ${user},${pwd} ${host}
>
> but it doesn't work. Uhm... it's getting more and more complicated...
Don't forget that first the string is handled by the shell, then by lftp.
That means that \ is processed twice, $$ is replaced with the shell
process number, etc.
Probably -X option would be easier to deal with:
mirror -X Maikefile -X bbclone/ -X db/ -X trash/ -X *~ -X .*
(directory names should be with a trailing slash)
--
Alexander.