Hello,

I want to create a list of all the files that lftp has d/l to my local
computer and then use that list to have the next run exclude them from
being d/l again.  I cannot find anything specific in the man page that
allows you to use a file with stuff to exclude.

I did come across this post

https://multimerch.com/blog/rsync-lftp-and-exclude-lists/

"I searched for an ftp alternative to rsync and stumbled upon lftp in this
post. It looked really nice until I found out lftp doesn't support exclude
lists, which means you can't make it read exclude patterns from a file. The
good news is, lftp does allow you to specify multiple --exclude switches at
once, so I modified the command to make use of my exclude-list.txt like
this:


lftp -u username,password -e "mirror --only-newer sed 's/^/--exclude /'
exclude-list.txt | tr 'n' ' ' --reverse /path/to/local/dir
/path/to/public_html" server.com

This way, sed prepends every line with an --exclude switch and tr replaces
newlines so in the end we have our lftp mirror command with all necessary
excludes in it."

but am not sure if there is a more simple approach as this seems
complicated to a beginner in linux.

Please let me know if this is the best way to exclude files from d/l from a
file.

Thanks
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to