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://user@domain.com
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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.