1

I have same folder name in different sub-directories, but while mirroring I want to exclude specific folder only.

Example :

I have directory "123" in different directories

./abc/123/
./abc/xyz/123/
./xxx/123/
./abc/yyy/123/

I want to exclude ./abc/123/ only, but if I use below command that exclude all occurance

lftp  -p 22 -e 'mirror --exclude ./abc/123/ './abc' '/var/www/' ; exit' sftp://[email protected]

1 Answer 1

0

If ^\ is specified, only the top level seems to be excluded.

Example :

home/
 ├ img/
 │ └ dummyA.png
 └ upload/
   └ img/
     └ dummyB.png

In case of the above directory structure

mirror --reverse -x ^\img/ --delete /home /site
site/
 └ upload/
   └ img/
     └ dummyB.png

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.