Undo delete


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Undo delete
# 1  
Old 01-17-2005
Undo delete

HI folks,


I have just deleted a folder which i need it back. I am not a big
unix user so any help is appreciated. The thing is that i had found
images in a folder:


./home/tom/.kde/share/cache/http/b/[filename_removed].jpg
as you can see these images should not really be here.
When i asked a guy in work to get details on them he deleted them


instead, crossed wires!!!! he typed ( rm -rf tom )
The thing is, the images are on a managed sever not in our premises
and the /tom folder is the name of the guy who manages it. And there
were a lot worse www's in the folder which is why i am looking for
help.


If anybody can help me to retrieve the folder it would be much
appreciated


Regards


Cormac O'Donnell

EDIT: I removed the filename as it was offensive and serves no purpose - Zazzybob

Last edited by zazzybob; 01-17-2005 at 09:00 AM..
# 2  
Old 01-17-2005
Under UNIX, if files are removed there is generally no way of undeleting them - your only choice is to restore from a backup.

Under some circumstances if the disk can be brought immediately offline after the deletion and mounted read-only, a data-recovery company/expert may be able to recover some of the data - however seeing as this is a managed server which is probably using some kind of RAID, the areas of the disk(s) that held this information before will no doubt have been written to.

Cheers
ZB
# 3  
Old 01-17-2005
You might try "unrm". A friend used it years ago and said it works.

http://freshmeat.net/projects/unrm/

Or do a search on google for more hits.
# 4  
Old 01-18-2005
I think "unrm" only works on ext2 filesystems.... i know ext3 can be mounted ext2 but you cannot undelete from a jounalled ext3 filesystem - to quote from a post on the Linux kernel mailing list
Quote:
I'm afraid your out of luck. This subject was covered recently on the
linux-kernel mailing list.
The ext3 data structures do not support any method of undeleting.
Too much data is erased when a file is deleted.
I suppose it's all academic until we find out what filesystem the OP is using....

Cormac: please post the output of df -hT (I assume you're running Linux here....)

Cheers
ZB
# 5  
Old 01-18-2005
output from df -hT

Output:

Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext3 372M 116M 237M 33% /
/dev/sda1 ext3 45M 14M 29M 32% /boot
/dev/sda5 ext3 13G 9.4G 2.8G 77% /home
none tmpfs 251M 0 250M 0% /dev/shm
/dev/sda2 ext3 35G 7.4G 26G 22% /usr
/dev/sda7 ext3 251M 30M 208M 13% /var

take it i'm jiggered on that front since its ext3.....But....

I could be in luck as i have found a tar file named home_accounts_20040901.tar, take it at face value and say that its a backup of the home accounts Smilie. Only thing is its 3GB,gonna take 18hrs to download. was looking around on a lot of sites yeasterday to see how i could look inside the archive, i have been able to list the files in it but it just lists thousands of files. The folder i am looking for was called "tom" and was a subfolder of "home" any way of searching fof this in the archive??


Thanks for the replys


Cormac
# 6  
Old 01-18-2005
Let's say the backup is located at /backup/home_archive.tar

If you do
Code:
cd /backup
tar xvf home_archive.tar "home/tom/*"

You'll recursively restore home/tom to /backup, so the restored home directory is located at /backup/home/tom

Cheers
ZB
# 7  
Old 01-18-2005
cheers buddy
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Undo overwrite file in UNIX?

Hi, Could anyone please advise if its possible in unix to undo the changes for a file that has been overwrriten. By mistake i have overwritten a file and now i need the original file, is there a way? Please Help!!! (2 Replies)
Discussion started by: mail.chiranjit
2 Replies

2. AIX

mount /test / is it possible to undo?

Hello! As a totally newbie I was testing 'mount' command but it doesn't worked for me. then finally I used this commend above 'mount /test / ' - and sever doesn't respond now :/ Is it possible to undo somehow this commanand? (5 Replies)
Discussion started by: jui_01
5 Replies

3. Shell Programming and Scripting

Need to undo hyphenation in columns

I have a file with two columns (output from Tivoli Storage Manager) where each column has 13 character spaces and they are separated by 5 spaces. The columns are schedule names and node names and many of them are longer than 13 characters so they get hyphenated by TSM during the output. I... (3 Replies)
Discussion started by: jongudm
3 Replies

4. Solaris

disabled nwam - how to undo?

I installed Solaris 11 Express on my machine and connected to it remotely using putty. I then run the svcadm disable /network/physical:nwam command to stop the NWAM service. Now I cannot connect to the Solaris machine remotely anymore, but I have physical access to it as well. How do I undo... (1 Reply)
Discussion started by: RychnD
1 Replies

5. Shell Programming and Scripting

Undo in unix

Hi All, Is there any undo option is there in unix same as recycle bin in windows? (5 Replies)
Discussion started by: Jairaj
5 Replies

6. UNIX for Dummies Questions & Answers

How do I undo a link?

Hi. Newbie here....so Unix for Dummies question for sure. I was compiling a piece of software and having problems and somebody suggested: sudo ln -s /usr/X11 /usr/X11R6 Didn't work. How do I undo this? I am on a Mac OS X snow leopard. I figure it is something with the unlink command... (7 Replies)
Discussion started by: stoucha
7 Replies

7. Shell Programming and Scripting

Doing undo in Vi editor

I generally use 'u' to do undo in vi editor. The problem is that it only does one level of undo. Is it possible to recursively undo all the changes in vi editor till we reach the original stage. (2 Replies)
Discussion started by: paragkalra
2 Replies

8. HP-UX

Undo vgextend

Hi I had extended one of the FS yesterday as rsync was failing and the temp solution was to extend it to 4GB while we worked on cron script. spthrv01:/root# bdf /p05 Filesystem kbytes used avail %used Mounted on /dev/vg232/lvol1 130940928 82208608 48385792 63% /p05 ... (5 Replies)
Discussion started by: hedkandi
5 Replies

9. Red Hat

how to undo the last installed update on fedora.

Hi All, I'm a newbie to system administration, I'd like to know how to check the logs (what update was installed last) , and I'd like to know how to undo the last update on the fedora 9 system ( kindof an equivalent to system restore in windows). I have a HP 22 inch monitor, when I installed... (3 Replies)
Discussion started by: ramky79
3 Replies

10. AIX

undo installation on AIX 4.3

Hi, How can I undo installation of a package on AIX 4.3 properly? It's an install script. On linux, I usually just kill the process and delete from disk with this command "find .... exec rm -r {}\;". And it usually works. Can I do the same with AIX 4.3? Thanks, Itik (2 Replies)
Discussion started by: itik
2 Replies
Login or Register to Ask a Question