By accident I've removed some folders (they were empty) in my home folder. I've created a new ones but they doesn't have proper icons etc... how can I recreate them step by step?
OK, to restore deleted directories
it should look like this:
# 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"
If that fails, install and run Ubuntu Tweak
First, stop using your system from the hard drive ASAP. You will need to boot a live CD and try recovery from there.
I have had mixed, generally poor results with the ext4 file system, but try , in order, testdisk and then photorec. Both are in the repositories and both can be installed in the live session
sudo apt-get update sudo apt-get install testdisk
You then run testdisk from the command line
# you might be able to run it as a user, but I would run it as root sudo testdisk
There is a step-by-step tutorial , with screen shots, here
If that fails, try photorec.
Photorec is a part of the testdisk package, again there is a detailed walk through here
If that fails, you can try extundelete
Last time I tried that, it did not recover my files.