Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2002 11:37:49 +0200
From:      Paul Everlund <tdv94ped@cs.umu.se>
To:        "Brian T.Schellenberger" <bts@babbleon.org>
Cc:        Jonathan Chen <jonc@chen.org.nz>, freebsd-questions@FreeBSD.ORG
Subject:   Re: cat: A bug or just as it should be?
Message-ID:  <3CC136ED.28E55794@cs.umu.se>
References:  <3CC08E8E.B5EEEA90@cs.umu.se> <20020420102030.A6992@grimoire.chen.org.nz> <3CC099F8.531ECECE@cs.umu.se> <20020420034724.4FA12BB39@i8k.babbleon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
"Brian T.Schellenberger" wrote:
> 
> On Friday 19 April 2002 06:28 pm, Paul Everlund wrote:
> | Jonathan Chen wrote:
> | > On Sat, Apr 20, 2002 at 12:08:12AM +0200, Paul Everlund wrote:
> | >
> | > [...]
> | >
> | > > fw# ls -l
> | > > total 2
> | > > drwxr-xr-x  10 root  wheel  512 20 Mar 01:20 home
> | > > fw#
> | > >
> | > > Doing a 'cat *' there gives the following result
> | > > (edited somewhat by me: "UUU" means an active user
> | > > and "uuu" means an user who has been removed):
> | > > hE?
> | > >    ??.<8?
> | > >          ??..· "UUU"yF?
> | > >                           ??"uuu"·???"UUU"-pF?¶?
> | > > "UUU"fF????"UUU"lQ-gF????"UUU"mQ-:????"UUU"^F?
> | > >
> | > > ??w
> | > > ww¦C?h??        "UUU"-C?T??"uuu"fw#
> | > >
> | > > Those "uuu" users, removed ones, are in no .his-
> | > > tory as there are no history file in the directory
> | > > /usr/home.
> | >
> | > You are cat'ing the contents of the directory "home" and getting
> | > binary output.
> |
> | Yep. But why does REMOVED directories show up? In another directory
> | removed files too shows up. Is this good? I can understand that dirs
> | and files that are on the HDD shows, but removed ones? Is this due
> | to left behind references of some kind?
> 
> Things are as they should be.  If you put enough new files in there, they
> will get overwritten but unless the file system is about to take more space
> for the directory than it did before, the file system doesn't erase the
> memory that contains that entries that used to be there, if you know what I
> mean.
> 
> Really, though catting a directory means nothing, nothing you see you try it
> means anything.  It's just a silly thing to do and it's causing needless
> worry, so stop it.  :-)

Thanks all for the information, mike, Brian, Jonathan, Ryan and Matthias! I'll
stop doing that silly thing, doing 'cat *', right away, as you say Brian. :-)

Anyway, due to security reasons, I believe that removed directories and files
should be zeroed out, and hence not viewable by 'cat *', but doing that maybe
have some disadvantages that I do not know of.

Thanks again all!

> --
> Brian T. Schellenberger . . . . . . .   bts@wnt.sas.com (work)

Best regards,
Paul

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CC136ED.28E55794>