LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2007, 02:17 PM   #1
carlsonultimate
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Rep: Reputation: 0
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?

-Ben
 
Old 09-28-2007, 02:22 PM   #2
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Rep: Reputation: 30
http://www.linux.com/base/ldp/howto/...eletion-1.html

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...

Last edited by lebabyg; 09-28-2007 at 02:23 PM.
 
Old 09-28-2007, 03:58 PM   #3
carlsonultimate
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Deleting these files deleted my desktop. Is there an easy way to get my desktop back or create a new one?
 
Old 09-28-2007, 05:45 PM   #4
lebabyg
Member
 
Registered: Mar 2006
Location: UK
Distribution: Ubuntu Feisty
Posts: 272

Rep: Reputation: 30
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!!
 
Old 09-28-2007, 07:28 PM   #5
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

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

Log in as root

Code:
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:
Code:
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:
Code:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the deleted contents back. UltraSoul Solaris / OpenSolaris 1 12-07-2006 02:08 AM
LXer: Bring back deleted files with lsof LXer Syndicated Linux News 0 11-17-2006 12:54 AM
Re: Getting back deleted files in ext3fs talpa_sai Linux - Software 1 04-04-2006 04:10 PM
Deleted user, want him back... leupi Linux - Networking 5 01-17-2006 09:55 PM
accidentally deleted some files and I don't know what I need to do to get them back Michele Linux - Newbie 2 06-26-2004 06:42 AM


All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration