bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: want to see contents of a directory, like back in the old days


From: Dan Jacobson
Subject: Re: want to see contents of a directory, like back in the old days
Date: 26 Nov 2001 11:10:45 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Never say never:

0xxxx# df .
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hdb1               495372     52538    417258  11% /
0xxxx# debugfs /dev/hdb1
debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
debugfs:  cd /tmp/xxxx
debugfs:  ls
115859 (12) .   54868 (12) ..   38629 (1000) fai   
debugfs:  dump . dir
[2]+  Stopped                 debugfs /dev/hdb1
0xxxx# ll
total 2
-rw-r--r--    1 root     root         1024 11 26 10:53 dir
drwxr-xr-x    2 root     root         1024 02 26  2001 fai/
0xxxx# od -c dir
0000000 223    001  \0  \f  \0 001 002   .  \0  \0  \0   T     \0  \0
0000020  \f  \0 002 002   .   .  \0  \0    226  \0  \0    003 003 002
0000040   f   a   i  \0   s    001  \0    003 004 001   f   a   i   2
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

Ah ha, just what I was looking for: the name of that file I had
deleted was "fai2".

> not likely having to do any _fundamentally_ important application of
> the information...

Dan> I wanted to see the name of a file I just deleted.  In the old days I
Dan> could do od -c . and probably see it.  Now some folks say that that is
Dan> impossible here on Mandrake 7.2.  Musn't there be some way with dd,
Dan> etc. Or, ok, what c script will do it?  The one Joe posted doesn't
Dan> seem to show gone things.

>>>>> "Dan" == Dan Jacobson <address@hidden> writes:

Dan> I remember back in the old days, one could see the contents of
Dan> directories (not ls, silly), with even former file names, etc. junk
Dan> visible.  Is all hope gone on my EISDIR system like Paul says?:

>>>>> "Paul" == Paul Jarc <address@hidden> writes:

>>> Anyway, what I'm looking for is something that can dump out content of
>>> directories:
>>> $ ls -ld /tmp
>>> drwxrwxrwt   12 root     root         9216 Nov 20 21:58 /tmp/

>>> I want to see what lies in those 9216 bytes, please, using a
>>> /bin/sometool , not having to write a C program to do it.

Paul> On some OSes, cat works.  On others, it's impossible.  If read(2) can
Paul> set errno to EISDIR, on your system, it's impossible.
-- 
http://www.geocities.com/jidanni/ Tel+886-4-25854780



reply via email to

[Prev in Thread] Current Thread [Next in Thread]