LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-19-2012, 06:55 AM   #16
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0

Dear sharadchhetri,

please view the below output

debugfs: ls -d
5064161 (12) . 2 (12) .. 5098317 (20) mysqlstudy
5073036 (28) Godaddy remaining 5098278 (12) ramk 5070579 (12) sun
5075377 (44) bookstore.sql <5075692> (20) linuxram
5070274 (20) softwares
5064163 (68) ubuntu-linu-forest-wallpaper-fear-and-anxiety-background.jpg
5072788 (24) Godaddy Backup 5034787 (48) Pepsico12072012
<5075378> (24) .linuxram.swp 6371384 (32) olexam15062012.tar.gz
5098246 (16) HCMOne 5098316 (24) itsupportbkup
5100661 (64) pepsico_db12072012.sql <948675> (32) linuxram~
3237102 (128) CentOS-Base.repo <5075692> (104) .ram.conf.swx

Thanks,

Last edited by ramecare; 07-19-2012 at 07:35 AM.
 
Old 07-19-2012, 07:02 AM   #17
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
debugfs: ls -d
5064161 (12) . 2 (12) .. 5098317 (20) mysqlstudy
5073036 (28) Godaddy remaining 5098278 (12) ramk 5070579 (12) sun
5075377 (44) bookstore.sql <5075692> (20) linuxram
5070274 (20) softwares
5064163 (68) ubuntu-linu-forest-wallpaper-fear-and-anxiety-background.jpg
5072788 (24) Godaddy Backup 5034787 (48) Pepsico12072012
<5075378> (24) .linuxram.swp 6371384 (32) olexam15062012.tar.gz
5098246 (16) HCMOne 5098316 (24) itsupportbkup
5100661 (64) pepsico_db12072012.sql <948675> (32) linuxram~
3237102 (128) CentOS-Base.repo <5075692> (10) .ram.conf.swx

Thanks,

Last edited by ramecare; 07-19-2012 at 08:26 AM.
 
Old 07-19-2012, 07:20 AM   #18
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi,

I tried out the thing what sharadchhetri had posted .It works fine for me too

root@arun-desktop:/recover# ls
root@arun-desktop:/recover# touch recover
root@arun-desktop:/recover# cd
root@arun-desktop:~# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1d6d1d6c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 125 999424 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 125 60802 487384065 5 Extended
/dev/sda5 125 623 3998720 82 Linux swap / Solaris
/dev/sda6 623 60802 483384320 83 Linux
root@arun-desktop:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 454G 15G 417G 4% /
none 996M 260K 996M 1% /dev
none 1001M 2.6M 998M 1% /dev/shm
none 1001M 84K 1001M 1% /var/run
none 1001M 0 1001M 0% /var/lock
none 1001M 0 1001M 0% /lib/init/rw
/dev/sda1 961M 48M 865M 6% /boot
root@arun-desktop:~# debugfs -w /dev/sda6
debugfs 1.41.11 (14-Mar-2010)
debugfs: lsdel

debugfs: root@arun-desktop:~# cd /recover/
root@arun-desktop:/recover# ls
recover
root@arun-desktop:/recover#
 
Old 07-19-2012, 09:20 AM   #19
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
Can any one help me on this to recover a deleted file using debugfs

Thanks,
 
Old 07-19-2012, 01:45 PM   #20
sharadchhetri
Member
 
Registered: Aug 2008
Location: INDIA
Distribution: Redhat,Debian,Suse,Windows
Posts: 179

Rep: Reputation: 23
Quote:
Originally Posted by arun5002 View Post
Hi
Use the following commands

#lsof -pwln | grep deleted check whether file is still opened in any file descriptor


#lsof -Pwln | grep deleted
nautilus 1383 1000 20r REG 8,6 376 11723317 /home/arun/.local/share/gvfs-metadata/home (deleted)
nautilus 1383 1000 21r REG 8,6 32768 11723318 /home/arun/.local/share/gvfs-metadata/home-a427f454.log (deleted)
I worked on this problem found that in ext3 and ext4 filesystem we can restore the file but it is not in readable format.So it has no use.
The case is found with text related file only.

On jpg and png file it was successfully restoring.

It seems it is better to restore the file with the help of tool.
 
Old 07-20-2012, 03:20 AM   #21
ramecare
Member
 
Registered: Feb 2011
Posts: 179

Original Poster
Rep: Reputation: 0
Thank you sharadchhetri
 
  


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
[SOLVED] How to recover deleted files from a fat32 volume in Linux? colucix Linux - General 12 01-24-2019 09:56 PM
How recover deleted files in redhat linux basith7861 Linux - Newbie 2 05-03-2011 05:29 AM
LXer: Recover deleted files in linux with Photorec LXer Syndicated Linux News 0 10-12-2009 09:41 AM
recover deleted windows files from linux(help) rkrishna Linux - General 2 06-22-2005 11:32 AM
Recover deleted files from a Win partition in Linux? PenguinPwrdBox Linux - General 3 08-03-2004 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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