LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 08: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 08:38 AM.
 
Old 12-08-2012, 09:23 AM   #2
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
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, 09: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, 09:51 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 12: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, 12:47 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 01: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



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 07:50 AM
Retrieving important file on Windows General General 3 04-13-2006 07:10 PM
Important Folder deleted by mistake using the Gnome File Manager. chirucu Linux - General 4 03-08-2006 08:55 AM
incomplete installation - is this file important? Alfie67 SUSE / openSUSE 1 04-04-2005 05:20 AM
Shadow file is important? hus Linux - Security 4 05-13-2004 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 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
Open Source Consulting | Domain Registration