主目录混乱

主目录混乱

最近,我安装了 Ubuntu 12.04。出于某种原因,我将我的主目录内容备份到另一个目录(例如bkpdir)。确切地说,我将文档、图片、下载等移动到bkp目录中。现在,删除了我所有原始主目录内容。我将所有bkp目录内容还原回主目录。我在桌面上找到了它们。我相信某种链条断了。我没有在它们上面找到相应的主目录图标。我该如何恢复它?此外,我在我的位置选项中找不到它们。

桌面如下所示:

显示多个文件夹的桌面屏幕截图

运行ls -lh ~ ~/Desktop结果如下:

nuthan@nuthan-desktop:~$ ls -lh ~ ~/Desktop
/home/nuthan:
total 2.8M
drwxr-x--- 11 nuthan nuthan 4.0K May 28 20:05 android-sdk-linux
drwxrwxr-x  4 nuthan nuthan 4.0K May 25 13:36 android-sdks
drwxrwxr-x  2 nuthan nuthan 4.0K May 18 17:30 convert
-rw-rw-r--  1 nuthan nuthan    0 May 30 09:07 dependancies~
drwxr-xr-x  2 nuthan nuthan 4.0K Jun  6 14:16 Desktop
drwxrwxrwx  6 nuthan nuthan 4.0K Jun  6 12:06 Documents
drwxr-xr-x 28 nuthan nuthan  12K Jun  6 13:52 Downloads
drwxrwxr-x  2 nuthan nuthan 4.0K Mar  6 13:23 examples
-rw-r--r--  1 nuthan nuthan 8.3K May 11 16:19 examples.desktop
drwxrwxr-x  4 nuthan nuthan 4.0K May 18 19:04 github
-rw-rw-r--  1 nuthan nuthan    0 May 28 18:40 linux~
drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Music
drwxrwxr-x  2 nuthan nuthan 4.0K May 30 08:48 node-code
drwxrwxr-x  4 nuthan nuthan 4.0K May 30 08:40 node_modules
drwxr-xr-x  7 nuthan nuthan 4.0K May 25 13:55 noduino
drwxrwxr-x  2 nuthan nuthan 4.0K May 30 11:58 nuthan
drwxrwxrwx  3 nuthan nuthan 4.0K May 24 11:13 Pictures
drwxrwxr-x  6 nuthan nuthan 4.0K Mar  6 13:23 public
drwxr-xr-x  2 nuthan nuthan 4.0K May 25 11:44 Public
drwxrwxr-x  2 nuthan nuthan 4.0K May 29 18:50 python
-rw-rw-r--  1 nuthan nuthan 983K Jun  6 14:16 Screenshot from 2012-06-06 14:16:37.png
-rw-rw-r--  1 nuthan nuthan 980K Jun  6 14:20 Screenshot from 2012-06-06 14:20:24.png
-rw-rw-r--  1 nuthan nuthan 731K Jun  6 14:22 Screenshot from 2012-06-06 14:22:06.png
drwxrwxr-x  3 nuthan nuthan 4.0K May 31 18:17 sketchbook
drwxrwxr-x  2 nuthan nuthan 4.0K Jun  6 13:05 sql
-rw-rw-r--  1 nuthan nuthan  201 May 28 22:08 sql~
drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Templates
-rw-rw-r--  1 nuthan nuthan 5.1K Jun  4 12:29 test~
drwxrwxr-x  3 nuthan nuthan 4.0K May 14 11:09 Titanium_Studio
drwxrwxr-x  4 nuthan nuthan 4.0K May 14 21:00 Titanium Studio Workspace
drwxrwxr-x  4 nuthan nuthan 4.0K Jun  1 18:29 TPM_Trak
drwxrwxr-x  2 nuthan nuthan 4.0K May 24 17:30 Ubuntu One
drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Videos
drwxrwxr-x  6 nuthan nuthan 4.0K May 31 15:10 workspace
drwxrwxr-x  3 nuthan nuthan 4.0K May 14 11:57 Zend

/home/nuthan/Desktop:
total 20K
-rw-rw-r-- 1 nuthan nuthan  441 May 30 09:07 dependancies
-rw-rw-r-- 1 nuthan nuthan 1.6K May 28 18:40 linux
-rw-rw-r-- 1 nuthan nuthan  470 May 28 22:16 sql
-rw-rw-r-- 1 nuthan nuthan 5.1K Jun  4 19:34 test
nuthan@nuthan-desktop:~$ 

答案1

我必须更改 xdg-user-dirs-update 文件中的 XDG 引用

答复于:https://answers.launchpad.net/ubuntu/+question/199558

文件位置:/home/username/.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="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"

# 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="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

相关内容