我正在使用 Ubuntu 18.04,我刚刚创建了一个标记为 Home 的单独主分区,并使用 rsync 复制了内容:
sudo rsync -aXS --progress --exclude='/*/.gvfs' /home/. /media/Home/.
然后当我执行命令时:
sudo diff -q -r /home /media/Home -x ".gvfs/*"
我发现了许多差异。因此,我在不同时间使用了几次 rsync 命令,但仍然显示了许多差异。我发现 Spotify 和 Firefox 存在差异,因为它们要么是使用 rsync 后在 /home 中生成的缓存文件,要么是使用 rsync 后从 /home 中删除的缓存文件,但这些文件保留在 /media/Home 中。
但是,我在 anaconda3 文件夹、gnome-session-monitor、gnome-shell 和 gnome-calculator 中的 matplotlib 中发现了一些差异,我对此很担心:
diff: /home/oussema/anaconda3/pkgs/matplotlib-2.1.2-py36h0e671d2_0/lib/libtcl.so: No such file or directory
diff: /media/Home/oussema/anaconda3/pkgs/matplotlib-2.1.2-py36h0e671d2_0/lib/libtcl.so: No such file or directory
diff: /home/oussema/anaconda3/pkgs/matplotlib-2.1.2-py36h0e671d2_0/lib/libtk.so: No such file or directory
diff: /media/Home/oussema/anaconda3/pkgs/matplotlib-2.1.2-py36h0e671d2_0/lib/libtk.so: No such file or directory
Only in /home/oussema: .gvfs
Files /home/oussema/.local/share/gnome-shell/application_state and /media/Home/oussema/.local/share/gnome-shell/application_state differ
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-calculator/167/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/167/.themes: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-calculator/170/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/170/.themes: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libdconfsettings.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libdconfsettings.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiognomeproxy.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiognomeproxy.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiognutls.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiognutls.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiolibproxy.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/gio-modules/libgiolibproxy.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-am-et.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-am-et.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-broadway.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-broadway.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-cedilla.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-cedilla.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-cyrillic-translit.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-cyrillic-translit.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-fcitx.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-fcitx.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ibus.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ibus.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-inuktitut.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-inuktitut.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ipa.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ipa.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-multipress.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-multipress.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-thai.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-thai.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ti-er.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ti-er.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ti-et.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-ti-et.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-viqr.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-viqr.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/common/.cache/immodules/im-xim.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/common/.cache/immodules/im-xim.so: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-calculator/current/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-calculator/current/.themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/39/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/39/.themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/41/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/41/.themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libdconfsettings.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libdconfsettings.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiognomeproxy.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiognomeproxy.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiognutls.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiognutls.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiolibproxy.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/gio-modules/libgiolibproxy.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-am-et.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-am-et.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-broadway.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-broadway.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-cedilla.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-cedilla.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-cyrillic-translit.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-cyrillic-translit.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-fcitx.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-fcitx.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ibus.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ibus.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-inuktitut.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-inuktitut.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ipa.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ipa.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-multipress.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-multipress.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-thai.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-thai.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ti-er.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ti-er.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ti-et.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-ti-et.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-viqr.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-viqr.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-xim.so: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/common/.cache/immodules/im-xim.so: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-Black/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/cursors: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/cursor.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/icons/DMZ-White/index.theme: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.local/share/themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.local/share/themes: No such file or directory
diff: /home/oussema/snap/gnome-system-monitor/current/.themes: No such file or directory
diff: /media/Home/oussema/snap/gnome-system-monitor/current/.themes: No such file or directory
这是 diff 命令的完整输出。 我想知道仅使用 fstab 将 /media/Home 切换到 /home 是否安全?
答案1
如果你要 rsync 某个用户的主目录,则需要从另一个用户的登录中执行此操作当正在 rsync 的用户已注销时因为主目录会随着您正在运行的所有应用程序而不断变化。
在一个系统上拥有两个用户也是明智的:一个用户和一个管理员:普通用户用于日常使用,而管理员用于执行管理工作或者当其他用户的配置文件出现问题时使用。
或者:
- 只需从实时 USB 启动并拥有完全静态的 rsync
- 从 CloneZilla Live USB 启动并获取分区映像。