我运行以下命令来备份我的主目录:
$ rsync -ahv \
--info=progress2 \
--partial \
--exclude=.cache/ \
--exclude=.miniconda3/ \
--exclude=.thunderbird/ \
--exclude=.vscode/ \
--exclude=.cargo/ \
/home/tim \
/run/media/tim/Volume/Backups/Tim/2021-04-15/
但是,当命令完成时,我注意到我的所有文件都设置了可执行标志!例如,当查看我的Cheatsheets
-directory 时:
$ ls -l /home/tim/Cheatsheets/
total 3932
-rw-r--r-- 1 tim tim 2056316 11. Dez 14:43 comprehensive-latex-symbol-list.pdf
-rw-r--r-- 1 tim tim 112655 16. Feb 2019 EmacsCheatsheet.pdf
-rw-r--r-- 1 tim tim 186060 7. Jun 2019 GoogleColabShortcuts.png
-rw-r--r-- 1 tim tim 217283 12. Dez 23:44 JupyterLabShortcuts.pdf
-rw-r--r-- 1 tim tim 28664 3. Mai 2019 JupyterNotebookCheatsheet.pdf
-rw-r--r-- 1 tim tim 82953 25. Jan 2019 LaTeX_Cheatsheet.png
-rw-r--r-- 1 tim tim 261478 22. Sep 2018 LaTeXMathSymbols.pdf
-rw-r--r-- 1 tim tim 574022 24. Okt 2018 LTspiceShortcuts.pdf
-rw-r--r-- 1 tim tim 634 24. Okt 2018 MagitWorkflow.org
-rw-r--r-- 1 tim tim 17754 24. Okt 2018 MagitWorkflow.pdf
-rw-r--r-- 1 tim tim 60448 24. Dez 2018 NeotreeCheatsheet.png
-rw-r--r-- 1 tim tim 169752 18. Feb 2019 PCRE_Cheatsheet.png
-rw-r--r-- 1 tim tim 146499 21. Mär 2019 VSCodeShortcuts.pdf
-rw-r--r-- 1 tim tim 79881 6. Nov 2018 WiresharkShortcuts.pdf
而在备份目录中:
$ ls -l /run/media/tim/Volume/Backups/Tim/2021-04-15/tim/Cheatsheets/
total 5888
-rwxr-xr-x 1 tim tim 2056316 11. Dez 14:43 comprehensive-latex-symbol-list.pdf
-rwxr-xr-x 1 tim tim 112655 16. Feb 2019 EmacsCheatsheet.pdf
-rwxr-xr-x 1 tim tim 186060 7. Jun 2019 GoogleColabShortcuts.png
-rwxr-xr-x 1 tim tim 217283 12. Dez 23:44 JupyterLabShortcuts.pdf
-rwxr-xr-x 1 tim tim 28664 3. Mai 2019 JupyterNotebookCheatsheet.pdf
-rwxr-xr-x 1 tim tim 82953 25. Jan 2019 LaTeX_Cheatsheet.png
-rwxr-xr-x 1 tim tim 261478 22. Sep 2018 LaTeXMathSymbols.pdf
-rwxr-xr-x 1 tim tim 574022 24. Okt 2018 LTspiceShortcuts.pdf
-rwxr-xr-x 1 tim tim 634 24. Okt 2018 MagitWorkflow.org
-rwxr-xr-x 1 tim tim 17754 24. Okt 2018 MagitWorkflow.pdf
-rwxr-xr-x 1 tim tim 60448 24. Dez 2018 NeotreeCheatsheet.png
-rwxr-xr-x 1 tim tim 169752 18. Feb 2019 PCRE_Cheatsheet.png
-rwxr-xr-x 1 tim tim 146499 21. Mär 2019 VSCodeShortcuts.pdf
-rwxr-xr-x 1 tim tim 79881 6. Nov 2018 WiresharkShortcuts.pdf
从rsync
s 手册页中,我看到-a
我使用的标志是 的别名-rlptgoD
,-p
应该保留权限。这个命令我哪里出错了?