From owner-freebsd-questions Sat Apr 20 2:41:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from tninet.se (sheridan.tninet.se [195.100.94.102]) by hub.freebsd.org (Postfix) with ESMTP id 5641937B420 for ; Sat, 20 Apr 2002 02:41:29 -0700 (PDT) Received: from cs.umu.se (h151n1c1o1023.bredband.skanova.com [213.64.164.151]) by sheridan.tninet.se (BMR ErlangTM/OTP 3.0) with ESMTP id 565255.295469.1019.0s1845579sheridan ; Sat, 20 Apr 2002 11:37:49 +0200 Message-ID: <3CC136ED.28E55794@cs.umu.se> Date: Sat, 20 Apr 2002 11:37:49 +0200 From: Paul Everlund X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: sv,en MIME-Version: 1.0 To: "Brian T.Schellenberger" Cc: Jonathan Chen , freebsd-questions@FreeBSD.ORG Subject: Re: cat: A bug or just as it should be? References: <3CC08E8E.B5EEEA90@cs.umu.se> <20020420102030.A6992@grimoire.chen.org.nz> <3CC099F8.531ECECE@cs.umu.se> <20020420034724.4FA12BB39@i8k.babbleon.org> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "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