lftp mirror leaves empty folders on remote The Next CEO of Stack OverflowHow to determine if a...

Calculator final project in Python

Grabbing quick drinks

Is it possible to replace duplicates of a character with one character using tr

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Are police here, aren't itthey?

What was the first Unix version to run on a microcomputer?

Should I tutor a student who I know has cheated on their homework?

0 rank tensor vs 1D vector

How many extra stops do monopods offer for tele photographs?

Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?

How to get from Geneva Airport to Metabief, Doubs, France by public transport?

Is French Guiana a (hard) EU border?

Why isn't acceleration always zero whenever velocity is zero, such as the moment a ball bounces off a wall?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

What steps are necessary to read a Modern SSD in Medieval Europe?

Why the difference in type-inference over the as-pattern in two similar function definitions?

Why do remote US companies require working in the US?

Does Germany produce more waste than the US?

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

Why do airplanes bank sharply to the right after air-to-air refueling?

Do I need to write [sic] when a number is less than 10 but isn't written out?

How to edit “Name” property in GCI output?

Running a General Election and the European Elections together



lftp mirror leaves empty folders on remote



The Next CEO of Stack OverflowHow to determine if a bash variable is empty?List all empty folderslftp, setting for ignoring time-stamp?Mirror directory, only purging files in destination directory older than 7 daysMirror remote mailbox (gmail) locallyRecursively delete empty folders with verbose outputlftp mirror files from a directory tree into single directoryCorrect usage of lftp mirror --older-thancron and lftp issuelftp reverse mirror silently skips files in subfolders












1















My script is set up with this for lftp



    lftp -p 2218 -u $login,$pass sftp://$host << EOF
set mirror:use-pget-n 5
mirror -c -P5 --depth-first --Remove-source-files --log=/home/dog/downloadsync.log $remote_dir $local_dir


And it works great, except it leaves empty folders on the remote directory EVERY STINKING TIME. I've tried without --depth-first and it still will leave them.



I've tried adding a rmdir * after the mirror, and before the quit, but it creates some serious problems if the script crashes [don't ask that story] Is there any solution?










share|improve this question














bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    don't ask that story? you can't say that...

    – bkr
    Oct 1 '14 at 2:15











  • Have you tried using rsync, scp or sftp instead of lftp ?

    – janos
    Dec 27 '14 at 11:16
















1















My script is set up with this for lftp



    lftp -p 2218 -u $login,$pass sftp://$host << EOF
set mirror:use-pget-n 5
mirror -c -P5 --depth-first --Remove-source-files --log=/home/dog/downloadsync.log $remote_dir $local_dir


And it works great, except it leaves empty folders on the remote directory EVERY STINKING TIME. I've tried without --depth-first and it still will leave them.



I've tried adding a rmdir * after the mirror, and before the quit, but it creates some serious problems if the script crashes [don't ask that story] Is there any solution?










share|improve this question














bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    don't ask that story? you can't say that...

    – bkr
    Oct 1 '14 at 2:15











  • Have you tried using rsync, scp or sftp instead of lftp ?

    – janos
    Dec 27 '14 at 11:16














1












1








1








My script is set up with this for lftp



    lftp -p 2218 -u $login,$pass sftp://$host << EOF
set mirror:use-pget-n 5
mirror -c -P5 --depth-first --Remove-source-files --log=/home/dog/downloadsync.log $remote_dir $local_dir


And it works great, except it leaves empty folders on the remote directory EVERY STINKING TIME. I've tried without --depth-first and it still will leave them.



I've tried adding a rmdir * after the mirror, and before the quit, but it creates some serious problems if the script crashes [don't ask that story] Is there any solution?










share|improve this question














My script is set up with this for lftp



    lftp -p 2218 -u $login,$pass sftp://$host << EOF
set mirror:use-pget-n 5
mirror -c -P5 --depth-first --Remove-source-files --log=/home/dog/downloadsync.log $remote_dir $local_dir


And it works great, except it leaves empty folders on the remote directory EVERY STINKING TIME. I've tried without --depth-first and it still will leave them.



I've tried adding a rmdir * after the mirror, and before the quit, but it creates some serious problems if the script crashes [don't ask that story] Is there any solution?







bash scripting mirroring mirror ftp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 1 '14 at 2:07









heartbtheartbt

61




61





bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 7 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    don't ask that story? you can't say that...

    – bkr
    Oct 1 '14 at 2:15











  • Have you tried using rsync, scp or sftp instead of lftp ?

    – janos
    Dec 27 '14 at 11:16














  • 1





    don't ask that story? you can't say that...

    – bkr
    Oct 1 '14 at 2:15











  • Have you tried using rsync, scp or sftp instead of lftp ?

    – janos
    Dec 27 '14 at 11:16








1




1





don't ask that story? you can't say that...

– bkr
Oct 1 '14 at 2:15





don't ask that story? you can't say that...

– bkr
Oct 1 '14 at 2:15













Have you tried using rsync, scp or sftp instead of lftp ?

– janos
Dec 27 '14 at 11:16





Have you tried using rsync, scp or sftp instead of lftp ?

– janos
Dec 27 '14 at 11:16










1 Answer
1






active

oldest

votes


















0














Use lftp-4.7.1 and mirror --Move option. It will remove source files and empty folders. The option first appeared in lftp-4.7.0.






share|improve this answer





















  • 1





    Please add some more details to explain this answer ...

    – Pierre.Vriens
    Apr 15 '16 at 13:52












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f632608%2flftp-mirror-leaves-empty-folders-on-remote%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Use lftp-4.7.1 and mirror --Move option. It will remove source files and empty folders. The option first appeared in lftp-4.7.0.






share|improve this answer





















  • 1





    Please add some more details to explain this answer ...

    – Pierre.Vriens
    Apr 15 '16 at 13:52
















0














Use lftp-4.7.1 and mirror --Move option. It will remove source files and empty folders. The option first appeared in lftp-4.7.0.






share|improve this answer





















  • 1





    Please add some more details to explain this answer ...

    – Pierre.Vriens
    Apr 15 '16 at 13:52














0












0








0







Use lftp-4.7.1 and mirror --Move option. It will remove source files and empty folders. The option first appeared in lftp-4.7.0.






share|improve this answer















Use lftp-4.7.1 and mirror --Move option. It will remove source files and empty folders. The option first appeared in lftp-4.7.0.







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 15 '16 at 15:19

























answered Apr 15 '16 at 13:20









lavlav

30137




30137








  • 1





    Please add some more details to explain this answer ...

    – Pierre.Vriens
    Apr 15 '16 at 13:52














  • 1





    Please add some more details to explain this answer ...

    – Pierre.Vriens
    Apr 15 '16 at 13:52








1




1





Please add some more details to explain this answer ...

– Pierre.Vriens
Apr 15 '16 at 13:52





Please add some more details to explain this answer ...

– Pierre.Vriens
Apr 15 '16 at 13:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f632608%2flftp-mirror-leaves-empty-folders-on-remote%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

Список ссавців Італії Природоохоронні статуси | Список |...

Українські прізвища Зміст Історичні відомості |...