AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1060465
Accepted
Tim Hilt
Tim Hilt
Asked: 2021-04-16 02:58:03 +0800 CST2021-04-16 02:58:03 +0800 CST 2021-04-16 02:58:03 +0800 CST

rsync 复制所有具有可执行权限的文件

  • 772

我运行以下命令来备份我的主目录:

$ 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

从rsyncs 手册页中,我看到-a我使用的标志是 的别名-rlptgoD,-p应该保留权限。这个命令我哪里出错了?

backup linux permissions rsync file-permissions
  • 1 1 个回答
  • 370 Views

1 个回答

  • Voted
  1. Best Answer
    RalfFriedl
    2021-04-16T03:08:47+08:002021-04-16T03:08:47+08:00

    这不是 的功能rsync,它是目标文件系统的(缺失)功能。

    我的猜测是目标文件系统是具有 NTFS 或 FAT 文件系统的 USB 存储。这些文件系统不支持更改可执行标志。

    • 2

相关问题

  • IIS 6.0 (Windows Server 2003) 备份的最佳实践?

  • 10TB数据和3台服务器的备份解决方案

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

  • 最佳混合环境(OS X + Windows)备份?[关闭]

  • 如何从 SQL Server 2008 中的备份中排除索引

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve