One day I moved the Documents directory inside the Downloads directory. I could still access it as usual, but, eventually, I ended receiving this message (also see the screenshot):
Oops! Something went wrong.
Unable to find the requested file. Please check the spelling and try again.
$ cat ~/.config/user-dirs.dirs
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/"
I ran
gedit ~/.config/user-dirs.dirs
Rerun of
$ cat ~/.config/user-dirs.dirs
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"
Update
21st October 2019
As mentioned I moved my Music and Video files to the Home directory. So I did the re-run of gedit ~/.config/user-dirs.dirs
. Type in Documents, Music and Videos.
Everything appeared as usual. I tried restarting it and shutting down my laptop. The Music and Videos directory remains there and can be opened. Did it again:
gedit ~/.config/user-dirs.dirs
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"
Yet the Documents directory has not appeared. So the Document Directory is deleted. I will now try to use Photorec to use recover my Home Directory and files.
mv $HOME/Downloads/Documents $HOME/Documents
mv: cannot stat '/home/user/Downloads/Documents': No such file or directory
Older information:
I clicked properties on Documents everything on basic came up unknown and permissions: The permissions of "" could not be found.
Older information:
cat '/etc/xdg/user-dirs.defaults'
# Default settings for user directories
#
# The values are relative pathnames from the home directory and
# will be translated on a per-path-element basis into the users locale
DESKTOP=Desktop
DOWNLOAD=Downloads
TEMPLATES=Templates
PUBLICSHARE=Public
DOCUMENTS=Documents
MUSIC=Music
PICTURES=Pictures
VIDEOS=Videos
# Another alternative is:
#MUSIC=Documents/Music
#PICTURES=Documents/Pictures
#VIDEOS=Documents/Videos
My strategy to solve this problem is as follows:
The
Permission denied
message is the normal message that results from running~/.config/user-dirs.dirs
, so there's no problem there. The problem is that some of the directories in~/.config/user-dirs.dirs
are wrong, and three of these directories are duplicates of each other.To restore these directories back to their default locations open the terminal and type:
Change the following lines in gedit text editor:
Make sure that the three directories named Documents, Music and Videos exist in your home directory. Edit the above text block so it looks like this (the changes are highlighted in bold text):
Your original question was edited by changing
~/.config/user-dirs.dirs
back to its defaults after I posted this answer. As you wrote, Music is located in env and Videos is located in R, but this is not the expected result. Somehow the default paths to these three directories seem to be either duplicated or scrambled up. To help you track this problem down I have posted the results ofcat '/etc/xdg/user-dirs.defaults'
below:If you've gotten this far without errors, it seems that your problem is now how to locate your missing documents. Assuming that you haven't accidentally deleted them, the easiest way to find your missing documents is to search for them manually in Files file manager. Documents might be easier to find if you search for the most common document file extensions like .odt, .doc and .pdf.
Just move it back ..
I guess that you did
mv Documents Downloads
?So the reverse operation is
mv Downloads/Documents Documents
, or to make it work from any working directorymv $HOME/Downloads/Documents $HOME/Documents
.This doesn't work for me on Debian 11. Woke up to find my Documents folder has mysteriously vanished with everything in it. Recovery softwares don't show it among the deleted files and nor have I been able to locate it anywhere in the system.
Update I have been able to restore the Documents directory. "xdg-user-dirs-update --force" did the trick. However I lost everything in it.