MV相当于rsync命令 [英] mv equivalent rsync command
问题描述
我试图如果已经存在于文件夹移动到其他文件夹中的使用命令行,与覆盖,但我得到了错误目录用mv时..
i'm trying to move folders to another folders using command line, with overwrite if already exists, but i got error "Is a directory" when using mv..
例如:
mv src/test/ dest/
有许多文件和文件夹的src /测试/,也有对DEST /
there are many files and folders on src/test/, there are also some files and some folders on dest/
和我想的DEST文件和文件夹/ 替换与SRC /测试文件和文件夹/ 如果存在,例如:
and i want files and folders on dest/ replaced with files and folder from src/test/ if exists, example:
src/test/bla/boo replaces dest/bla/boo
src/test/bla/bla/boo replaces dest/bla/bla/boo
此外,每次一个文件传输完毕,即一个文件被删除从的src /测试/
also, everytime one file transfer completed, that one file deleted from src/test/
和整体转让的进度条就可以了。
我应该使用什么rsync的标志,使这个happend?
what rsync flag should i use to make this happend?
推荐答案
下面的命令行应达到你想要什么:
The following command line should achieve what you want:
$ rsync -a --progress --remove-source-files src/test/ dest
这篇关于MV相当于rsync命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!