Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Instead of creating folders, just logout/login. –  mikewhatever Dec 11 '11 at 20:09
    
Systemfiles in your home get recreated if they are missing when you start a new login! So remove the files you added yourself. –  Rinzwind Dec 11 '11 at 20:13
    
unfortunately didn't help...I removed my icons, but the new ones didn,t appear...after relogin and even after restart –  Patryk Dec 11 '11 at 20:19

2 Answers 2

up vote 3 down vote accepted

OK, to restore deleted directories

edit ~/.config/user-dirs.dirs ,

gedit ~/.config/user-dirs.dirs

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

http://ubuntu-tweak.com/

Screen Shot

share|improve this answer

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

http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_ext2

If that fails, try photorec.

Photorec is a part of the testdisk package, again there is a detailed walk through here

http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step

If that fails, you can try extundelete

http://extundelete.sourceforge.net/

Last time I tried that, it did not recover my files.

Good luck.

share|improve this answer
    
Well I don't want to recover any files because they didn't exist in my folders. Folders were empty. I just want to recreate home folders like images, videos etc... –  Patryk Dec 11 '11 at 20:26
    
What directories (folders) ? –  bodhi.zazen Dec 11 '11 at 20:27
    
When You open Your home folder You can see folders like Documents, Images, Videos etc... and I mean these folders. I've deleted them and I want to recreate them with proper icons for each. –  Patryk Dec 11 '11 at 20:31
    
I added an answer, I thought from my read you were in the data recovery mode , sorry –  bodhi.zazen Dec 11 '11 at 20:38
    
The first method didn't worked, terminal gave me some errors about missing files during saving user-dirs.dirs, but ubuntu tweak worked. Thank You! –  Patryk Dec 11 '11 at 20:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.