Find the answer to your Linux question:
Results 1 to 7 of 7
Hi there, I'm posting here today because this one is for a complete newby... I've deleted some important files with rm -rf * instead of rm -rf *.tmp Is there ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Location
    Leiria - Portugal
    Posts
    72

    Desaster with rm -rf *


    Hi there,

    I'm posting here today because this one is for a complete newby...

    I've deleted some important files with rm -rf * instead of rm -rf *.tmp

    Is there any way to get back!?

    Thanks in advance...

  2. #2
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552
    no

    Did you type it in the / dir ?
    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Location
    Leiria - Portugal
    Posts
    72

    No...

    Man you say some sad things you know...

    If I type that command at the / next I must jump in front of the train or something...

    Is a folder I've able to copy (9GB) from a dying NTFS HD. Its a samba share, is ext3

    I was deleting some *.tmp files and so when I've done that rm -rf *
    I stoped it with ^c but I've lost 2GB...

    Any sugestion?

  4. #4
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552
    Of you typed that command in the root dir '/' as the user: root, then the changes are high that your linux distro is #$#$ c.q. Bye Bye, too.

    or if you were type it in let see : /backup then only the files and directories in the /backup are affected by it and not any system files... Following what I'm trying to tell ya ?


    When you delete items as the user:root, it's gone forever., but maybe the following might help:

    Sometimes one wishes to recover deleted files. It helps to have backups. It helps to use a trash direc-
    tory, so that removed files are only moved to the trash. But actually removed files, although gone in
    principle, can sometimes be recovered. For details for the ext2 filesystem, see the Ext2fs-Undeletion
    mini-Howto.
    The howto can be found here.

    Good luck.
    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

  5. #5
    Just Joined!
    Join Date
    Jun 2004
    Location
    Leiria - Portugal
    Posts
    72

    Thanks

    Thanks a lot...

    My fs is ext3, but i'll try.

    Thanks again.

  6. #6
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682

    Re: Thanks

    Quote Originally Posted by GoldenEye
    Thanks a lot...

    My fs is ext3, but i'll try.

    Thanks again.
    IIRC, the only way to recover data on a journalling fs is to have unmounted it RIGHT after you deleted the stuff. Even then, it's not a certainty that you will get it back.

    Good luck with it, though!
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  7. #7
    Just Joined!
    Join Date
    May 2004
    Posts
    34

    Re: Desaster with rm -rf *

    Quote Originally Posted by GoldenEye
    Hi there,

    I'm posting here today because this one is for a complete newby...

    I've deleted some important files with rm -rf * instead of rm -rf *.tmp

    Is there any way to get back!?

    Thanks in advance...
    Sir I must shake your hand! I remember a while back I had a directory called "devl" for development. I su'd to root instead of sudo and didnt realize I was in the root "/" directory. In the bash shell, I was deleting an old copy of my ~/devl, so I typed rm -rf dev (hit tab then return and VOILA ! ) my /dev directory was blown away and then things went bad...

    Still have nightmares

    In answer to your question I'm afraid there's not much you can do unless you unmounted your partition shortly after doing this (in addition to running a filesytem like ext3 or reiser which supports journaling).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •