-   Linux - Newbie (
-   -   I deleted some files and and want them back (

carlsonultimate 09-28-2007 01:17 PM

I deleted some files and and want them back
Hey so I'm running suse 10.2 dual boot with windows xp. I was in suse using konqueror to view my home folder and was trying to delete a file and accidentally selected a whole tone of stuff and shift-deleted it. Is there any way to get this stuff back?


lebabyg 09-28-2007 01:22 PM

this howto is for an ext2 filesystem. I've never had the need to do it, but as far as I understand it, unless you zero a disk and you haven't let your OS overwrite any of the files yet,it should still be obtainable, how true this is I don't know... Good Luck!!!

EDIT... Looks like you're going to need a LiveCD as you want the filesystem to be unmounted...

carlsonultimate 09-28-2007 02:58 PM

Deleting these files deleted my desktop. Is there an easy way to get my desktop back or create a new one?

lebabyg 09-28-2007 04:45 PM

Blimey!! You have created a bit of a mess haven't you.. What exactly have you deleted, and what distro are you using... It might be better to do a clean install. I take it you haven't backuped!!

this213 09-28-2007 06:28 PM

From the login screen, and with your drives normally mounted, hit CTRL+ALT+F1

Log in as root


cp -Rf /etc/skel/* /home/myusername/
chown -Rf myusername:myusername /home/myusername

This will give you a clean installation desktop, overwriting any existing files that are also part of the default desktop configuration. This will not delete any of your existing files (personal documents, images, settings, email, etc).

Hit CTRL+ALT+F7 (or F4, or F6, F7 or even F8, depending on what distro you're using - sorry, I don't use Suse and don't know how they do things) to get back to your log in screen. Then try to log in with your normal user name again.

If your issue isn't solved, hit CTRL+ALT+BACKSPACE to restart X. It should throw you back out to the log in screen.

hit CTRL+ALT+F1 to get to the VT (virtual terminal) logged in as root and do:

rm -Rf /home/myusername/.*
cp -Rf /etc/skel/* /home/myusername/
chown -Rf myusername:myusername /home/myusername

This WILL delete all of your personal settings (don't worry about the two warnings, they merely state that you can't delete the symbolic directories "." (this directory) and ".." (parent directory)), including email, and reset your desktop to default. If you want to keep your email, doing "ls -a /home/myusername" will show you all of the dotfiles (the files that start with a "."), these are where your settings are stored. Look for one that matches your email client and copy it somewhere safe before you nuke your home directory, then copy it back once you're done. Once you've done this, hit CTRL+ALT+F4-8 (whichever you hit before) to get back to the X login screen and log in as your regular user again.

If you do all of this and still have problems, check /var/log/Xorg.0.log (or look for a file in that directory with "X" in it). To see the latest output, do:

tail -80 /var/log/Xorg.0.log
Look for anything that has (EE) in front of it.

Hope this helps. If not, just post back here again.

All times are GMT -5. The time now is 02:05 AM.