最近我在旧机器上安装了旧版本的 Ubuntu。每当我尝试安装任何软件时,都会收到一条错误消息,说找不到它:
$ sudo apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package vlc
Run Code Online (Sandbox Code Playgroud) upgrade package-management support repository release-management
您可以轻松地在外部硬盘驱动器上备份您的主文件夹
rsync -a --exclude=.cache --progress /home/$USER /media/linuxbackup/home/$USER
Run Code Online (Sandbox Code Playgroud)
我排除了 .cache 文件夹,因为我认为当我必须从这个备份重新安装时我永远不需要它。
我在这里找到了可以在普通备份中排除的所有文件夹的列表:
可以从主目录的备份中排除哪些文件和目录?
我创建了此答案的列表,其中包含以下形式的一些评论:
#These directories may be excluded:
.gvfs # contains mounted file systems?
.local/share/gvfs-metadata
.Private # contains the actual encrypted home directory
.dbus # session-specific
.cache
.Trash # do I need to say more?
.local/share/Trash
.cddb # cached info about audio CDs
.aptitude # cached packages lists
#Flash-specific:
.adobe # Cache for flash, maybe others?
.macromedia # except for Flash persistence, there is no reason to keep this
#Files: …Run Code Online (Sandbox Code Playgroud)