为什么 Ubuntu 一直在我的主目录中创建“下载”目录?

为什么 Ubuntu 一直在我的主目录中创建“下载”目录?

我已经设置了我的浏览器,以便文件会自动下载到我的主目录中名为“dls”的文件夹中 - 我发现它比“下载”更干净(并且希望我的所有目录都以小写字符开头。)

  1. 为什么 Ubuntu 坚持要重新创建“下载”文件夹,即使那里什么都没有添加?或许,哪些进程正在尝试访问此目录并确保它存在?

  2. 我如何将“下载”的特殊状态重新分配给我的新“dls”?

谢谢!

答案1

为什么 Ubuntu 坚持要重新创建“下载”文件夹,即使那里什么都没有添加?或许,哪些进程正在尝试访问此目录并确保它存在?

这是默认的恢复方法;您可以删除 /home/$USER/ 内的任何普通目录,系统将在您登录桌面时重新创建它。

我如何将“下载”的特殊状态重新分配给我的新“dls”?

查看~/.config/user-dirs.dirs并将有关下载的内容更改为您想要的内容(我的目录位于我的第二个磁盘上,而不是在我的启动盘上):

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="/discworld/Desktop"
XDG_DOWNLOAD_DIR="/discworld/Downloads"
XDG_TEMPLATES_DIR="/discworld/Templates"
XDG_PUBLICSHARE_DIR="/discworld/Public"
XDG_DOCUMENTS_DIR="/discworld/Documents"
XDG_MUSIC_DIR="/discworld/Music"
XDG_PICTURES_DIR="/discworld/Pictures"
XDG_VIDEOS_DIR="/discworld/Videos"

(并且希望我的所有目录都以小写字符开头。)

显然,您可以更改所有这些。请注意注释:仅支持 2 种方法:相对 $USER 或绝对(来自 / 的目录)。

相关内容