On Jun 30, 2008, at 03:01, Mark Ryan wrote:

I'm trying to figure out how to have lftp mirror a dir of MANY files to one of my server directories with many files and autoskip files of the same name. I tried the -x but it didn't seem to work. i tried like this:
 mirror -x /home/phil/cvs/ /home/bob/cvs/

The -x option expects a regular expression pattern:
-x RX, --exclude RX    exclude matching files
                        RX is extended regular expression

That is, it's for excluding files whose name match the pattern you specified.
This doesn't sound like what you are trying to do.

One of the following options seems more appropriate:
 -c, --continue         continue a mirror job if possible
 -n, --only-newer       download only newer files (-c won't work)
 -N, --newer-than=SPEC  download only files newer than specified time

If the files with the matching names also have the same content on both systems, then "mirror -c" should work.

Otherwise, maybe you could use one of the other two options based on last modification dates. If you touch all your local files, updating their last modification time-stamp to the current time, then doing a "mirror -n" lftp should skip all the already existing file names.

eg.
[in your shell:]
find source-directory -type f -exec touch {} +
[then in lftp:]
mirror -n source-directory

Reply via email to