LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-09-2007, 08:05 AM   #1
Goicox
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 0
Linux: Question - Recovering files


Hi to all,

I would like to know how I can recover files in linux. This is what happened:

I had a large file (> 1GB) named file1.txt. By mistake I wrote:

mv file0.txt file1.txt, where file0.txt was empty (0K).

Now all information from file1.txt is gone. Is there a way to recover it ?

file1.txt was arranged in 2^21 (2097152) rows x 54 columns, filled with doubles precision numbers. The file system is ext3.

Any suggestion ?

Goicox
 
Old 05-09-2007, 08:09 AM   #2
Centinul
Member
 
Registered: Jun 2005
Distribution: Gentoo
Posts: 552

Rep: Reputation: 30
I don't believe you are going to be able to recover that file. The mv command is essentially the combination of the cp and rm commands. So when you mv file0 to file1 it overwrote file1 and deleted file0.

I'm sorry to be the bearer of bad news.

HTH,

Centinul
 
Old 05-09-2007, 11:54 AM   #3
w_r_cromwell
Member
 
Registered: Feb 2006
Location: Michigan
Distribution: RedHat9, Core6, Ubuntu5.1
Posts: 42

Rep: Reputation: 18
Hi,

Ooooops! You might not be able to recover your file. Your system may have already re-used the space (or part of it) for something else. This is a very good persuader to backup your important files. When you issue commands to a linux system it won't make you get down on your knees and beg and reaffirm and reaffirm the affirmation and then ask if you are sure ten or twenty times (although some gui apps will do this). Backups have saved my bacon numerous times since the 80s.

See http://www.trinityhome.org

Look at their recovery tools. I used them on some drives to recover some of the data that was lost when the OS failed (Windows or course). Don't use the computer with the lost data as it may (certainly will eventually) overwrite the data you hope to recover. This is a very time consuming process and you may end up with little or nothing. Good luck.

Bill
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering files from reformatted FAT in linux ensa Linux - General 6 07-22-2007 04:25 PM
recovering files edgjerp Linux - Software 9 05-08-2007 04:07 PM
Recovering windows files from linux herve2001 Ubuntu 5 04-25-2007 10:40 PM
Help Recovering Files? ArenaKen Linux - General 3 06-14-2005 08:42 AM
recovering files nocturnal Linux - General 3 04-19-2003 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:07 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