l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 May 20 18:46

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] info about undeleting files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] info about undeleting files

It's best not to use the -r option in clean.  AMOF, you may want to use
the built-in $(RM) variable:

      $(RM) *.o $(BINARIES)

If you want a recursive delete, use `make -C`:

      make -C subdir clean
      $(RM) *.o $(BINARIES)

and make sure "subdir" has another Makefile.


On Tue, 20 May 2003, Peter Jay Salzman wrote:

> hi all,
> i just came across information that might be useful to some of you.
> i've always been smug about undeleting files.  i've read the undeletion
> howto many times and know the intimate details about inodes,
> superblocks, files and directories under ext2.
> i've also been very smug in my knowledge of GNU make, but today i made
> an awful, awful blunder:
>    PROGS = $(patsubst %.c, %, $(wildcard *.c))
>    CFLAGS = -W -Wall -g
>    LDLIBS = -lncurses
>    all: $(PROGS)
>    .PHONY: clean
>    clean:
>       rm -rf *.c core $(PROGS)
> can you feel my pain yet?
> well, no problem.  i unmounted /home and started to collect the deleted
> inodes:
>    satan# fuser -k -m /dev/hda7
>    satan# mount -o remount,ro /dev/hda7
>    satan# debugfs /dev/hda7
>    debugfs 1.33 (21-Apr-2003)
>    debugfs:  lsdel
>     Inode  Owner  Mode    Size    Blocks   Time deleted
>    0 deleted inodes found.
> that's wierd.  i should've gotten hundreds of deleted inodes.  what's up
> with that?
> after a bit of searching, i found this in the e2undel README:
>    ext3 behaves different from ext2 in one regard: When a file is
>    deleted, the information in the inode is also removed. Tools like
>    e2undel (or Ted T'so's debugfs) that rely on this information when
>    undeleting files don't work anymore.
> jumpin jehosephat.  i never knew this.  i guess this is why it's called
> the "ext2fs undeletion howto", emphasis on the "2".
> well, the program was very short and i recreated it in a few minutes, so
> that's not a problem at all.
> but the fact that ext3 inodes are removed when you delete a file is big
> news to me, and caught me by surprise.
> i figured i'd share this info, since i know some of you know how to
> recover files by hand also.
> pete
> --
> GPG Instructions: http://www.dirac.org/linux/gpg
> GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D

Mark K. Kim
PGP key available upon request.

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.