LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-08-2012, 09:33 AM   #1
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Rep: Reputation: Disabled
Unhappy Deleted very important file


Hello everyone.

accidentally I delete a very important file (my project to the school), is a script maked in openSUSE (Virtual Machine).

The problem is that I don't know what happened, but I delete all my files of the project using a command trying to delete one file.

If somebody know how to resolve this problem I appreciate it so much.

I don't know if there is a way to restore to the past a directory or some like that.

Regards

Last edited by Aerosilver; 12-08-2012 at 09:38 AM.
 
Old 12-08-2012, 10:23 AM   #2
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 302

Rep: Reputation: 61
As long as the files are not overwritten, it should be possible to recover them. Boot up your virtual machine with a live CD. Don't run the installed system, because then it will write files to the drive and it might overvrite the files. PhotoRec and TestDisc (on the same site) are good tools to recover deleted files.
 
1 members found this post helpful.
Old 12-08-2012, 10:48 AM   #3
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
I tried to install photorec using:

Code:
zypper install photorec
But the system show:

Code:
Loading repository data...
Reading installed packages...
'testdisk' not found.
Resolving package dependencies...
Nothing to do.
I tried too to installing it downloading it from the website: http://www.cgsecurity.org/wiki/TestDisk_Download
But I don't know how to install a tar.bz2

I tried to use: tar xvjf testdisk-6.14-WIP.linux26-x86_64.tar.bz2
and the file is uncompressed.

Then I enter into the directory uncompressed and I tried the typically command: ./configure.
But that don't run.... The system say "directory don't found" or something like that.

Sorry for my poor english.
I don't know i've got to do.
 
Old 12-08-2012, 10:51 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
Are you running that from your installed system? If so, don't do that! You will overwrite your file (if you haven't done that already). Use a live-CD, just download a copy of grml opr RIP Linux on you Windows machine and connect it to the VM's CD-ROM, then start from it and use Photorec (already installed) to scan the free space for files.
Good luck.

Tip for the future: think about a proper backup plan.
 
1 members found this post helpful.
Old 12-08-2012, 01:33 PM   #5
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Well, I recovered my files, but the photorec found more than 1000 files. And all the files are with the name of:

f0119811.sh

And all files with names like that.

I try to find my file using

Code:
find backup -type f -name myscript.sh
But I can't find it because all files are renamed at f011...

Now the unique way to find my file is finding a especifally word in all that scripts. But I don't know how to do that.
For example: If I search the word "consulta_marcas" I can fin the script.

Thanks
 
Old 12-08-2012, 01:47 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
If you delete a file the name information is also deleted, this is why you got the names in that way.
If you search for a word in your files try it with grep:
Code:
grep -r consulta_marcas /path/to/your/files
 
1 members found this post helpful.
Old 12-08-2012, 02:00 PM   #7
Aerosilver
LQ Newbie
 
Registered: Aug 2012
Posts: 28

Original Poster
Rep: Reputation: Disabled
Well. Now the terminal is findind the file who have that word. I hope can find.
I think this is all I can do. And if this can't find, then I have to begin again the script.

Thanks so much for all.
 
  


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
Fedora 11 installer deleted important NTFS partition, created new ext3 and installed Zach-S Linux - Software 3 06-16-2009 08:50 AM
Retrieving important file on Windows General General 3 04-13-2006 08:10 PM
Important Folder deleted by mistake using the Gnome File Manager. chirucu Linux - General 4 03-08-2006 09:55 AM
incomplete installation - is this file important? Alfie67 Suse/Novell 1 04-04-2005 06:20 AM
Shadow file is important? hus Linux - Security 4 05-13-2004 10:46 AM


All times are GMT -5. The time now is 12:27 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration