Re: [lftp] Move files to ftp
On Wednesday 24. December 2014 16:37:20 Alexander Lukyanov wrote: Please try http://lftp.yar.ru/ftp/devel/lftp-4.6.0.20141224.tar.gz, it has the option --Remove-source-files fixed to remove files already present at the target site. Hi, That was quick :-) Tested it, and the target files are now being removed. Thank you. -- Kai Stian ___ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Re: [lftp] Move files to ftp
Hi, Thank you, looking forward to the solution. - Kai Stian On Wednesday 17. December 2014 19:50:00 Alexander Lukyanov wrote: Ok, I see the problem. I'll implement a solution. 17.12.2014 17:34 пользователь Kai Stian Olstad kai.stian.ols...@gmail.com написал: Hi, My challenge is that I have no control over when files appear in the source folder, so running a rm -rf after a lftp most probably will delete new files that have been added to source. - Kai Stian On Wednesday 17. December 2014 12:05:18 Alexander Lukyanov wrote: You can run rm -rf after mirror to remove any remaining files. 23:37, сб, 13.12.2014, Kai Stian Olstad kai.stian.ols...@gmail.com: Hi, I'm trying to move files recursive to a ftp server. Since mput doesn't support moving files recursive I'm using mirror instead. lftp -e 'mirror -c -p -R --Remove-source-files /source /target; bye' -u ftp ftp://192.168.1.10 This sort of work since it remove the source files aka. move on the first run. But if the same files is copied in to /target directory again with cp -p to preserve the modification time, lftp doesn't put the file to the ftp server since the file already exist in /target and it doesn't remove the source file either. Shouldn't lftp remove the source anyway since I used the --Remove-source-files argument? Or is there another way to achieve this? -- Kai Stian Olstad PS: I tried sending this mail from a different domain but it did not go through so I'll try with Gmail. ___ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp ___ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Re: [lftp] Move files to ftp
Hi, My challenge is that I have no control over when files appear in the source folder, so running a rm -rf after a lftp most probably will delete new files that have been added to source. - Kai Stian On Wednesday 17. December 2014 12:05:18 Alexander Lukyanov wrote: You can run rm -rf after mirror to remove any remaining files. 23:37, сб, 13.12.2014, Kai Stian Olstad kai.stian.ols...@gmail.com: Hi, I'm trying to move files recursive to a ftp server. Since mput doesn't support moving files recursive I'm using mirror instead. lftp -e 'mirror -c -p -R --Remove-source-files /source /target; bye' -u ftp ftp://192.168.1.10 This sort of work since it remove the source files aka. move on the first run. But if the same files is copied in to /target directory again with cp -p to preserve the modification time, lftp doesn't put the file to the ftp server since the file already exist in /target and it doesn't remove the source file either. Shouldn't lftp remove the source anyway since I used the --Remove-source-files argument? Or is there another way to achieve this? -- Kai Stian Olstad PS: I tried sending this mail from a different domain but it did not go through so I'll try with Gmail. ___ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp ___ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp