LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 09-08-2004, 07:29 AM   #1
markhod
Member
 
Registered: Sep 2003
Posts: 103

Rep: Reputation: 15
how to retrieve deleted file in linux?


Hi,

I deleted my firefox directory and forgot to back up my bookmarks file. Is there any possiblity I can still retrieve the bookmark file? I am using Fedora core 1.

Thanks,

Mark
 
Old 09-08-2004, 07:40 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,989

Rep: Reputation: 63
If you deleted the file using KDE, it will probably be in your trash folder on your desktop. If you deleted it from the command-line then you won't be able to restore it.

You may be able to find it (or bits of it) if you can remember some of the text that the file contains. In an xterm, run
Code:
less -f /dev/hda1
(or whichever partition it was on), press backslash (\) and type in some text. Press Enter and it will start searching for that on the disk itself. You can then select the text in the xterm to copy it, and middle-click to paste it into another window, and get (at least bits of) the file back that way.

Hope that helps,

— Robert J. Lee
 
Old 09-08-2004, 07:47 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,608

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
You could also try:
Code:
grep -a -B[size before] -A[size after] 'text' /dev/[your_partition]
Replace [size before], [size after] and [your_partition] with something meaningfull.
e.g.: If you want to undelete a letter (+- 200 lines) starting with "Hi mum" which
was stored on /dev/hda1 you can try:
grep -a -B2 -A200 "Hi mum" /dev/hda1

Good luck
 
Old 09-08-2004, 07:56 AM   #4
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 274

Rep: Reputation: 30
You may also want to take a look at shell command debugfs, which allows you
to undelete deleted files. It would be very helpful if you know what the name
of the file in question was and where it was stored (partition, directory).

http://www.google.de/search?hl=de&ie...ing+file&meta=
produces (for example)
http://www.securityhorizon.com/secur.../undelete.html

to give you further hints.

HTH
 
Old 09-08-2004, 10:29 AM   #5
Lurker01
Member
 
Registered: Aug 2004
Location: Brooklyn, NY
Posts: 133

Rep: Reputation: 15
Fluxbox just needs to encorporate a trash can, simple as that.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I recover a deleted file in Linux ? josedsilva Linux - General 10 01-05-2010 07:49 AM
Retrieve a file from another server bijuhpd Linux - Newbie 2 09-29-2005 12:04 AM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
I deleted some files, how do i retrieve it? novkhan Linux - General 4 10-31-2004 02:57 PM
Acidentally deleted /var/www anyway to retrieve it? lucastic Linux - Software 1 12-28-2003 04:49 AM


All times are GMT -5. The time now is 12:29 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration