From owner-freebsd-current@FreeBSD.ORG Tue Jun 9 07:05:33 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C92B106564A for ; Tue, 9 Jun 2009 07:05:33 +0000 (UTC) (envelope-from serenity@exscape.org) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id EE8B98FC20 for ; Tue, 9 Jun 2009 07:05:32 +0000 (UTC) (envelope-from serenity@exscape.org) Received: from c83-253-252-234.bredband.comhem.se ([83.253.252.234]:50173 helo=mx.exscape.org) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.69) (envelope-from ) id 1MDvNz-0003XO-5G for freebsd-current@freebsd.org; Tue, 09 Jun 2009 09:04:45 +0200 Received: from [192.168.1.5] (macbookpro [192.168.1.5]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx.exscape.org (Postfix) with ESMTPSA id 27AF711E96F for ; Tue, 9 Jun 2009 09:04:42 +0200 (CEST) Message-Id: From: Thomas Backman To: FreeBSD Current Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Tue, 9 Jun 2009 09:04:40 +0200 X-Mailer: Apple Mail (2.935.3) X-Originating-IP: 83.253.252.234 X-Scan-Result: No virus found in message 1MDvNz-0003XO-5G. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1MDvNz-0003XO-5G 168b30b33ad2e34bf57398422ed03cee Subject: FS utils treates directories as files? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 07:05:33 -0000 FreeBSD 8.0-CURRENT r193521 (Jun 5), bash: [root@chaos /usr/ports]# file / /: directory [root@chaos /usr/ports]# cat / =EF=BF=BDg=EF=BF=BD=EF=BF=BD=3D[root@chaos /usr/ports]# [root@chaos /usr/ports]# cat /usr/ports/mail =EF=BF=BD =EF=BF=BD =EF=BF=BD=EF=BF=BD9=EF=BF=BD=EF=BF=BD=EF=BF=BDMakefile=EF=BF=BD@abook=EF=BF= =BD@adcomplain2=EF=BF=BD@althea=EF=BF=BD@addresses-=20 goodies=3D=EF=BF=BD@annoyance-filterF=EF=BF=BD@anomy-sanitizerN=EF=BF=BD@a= ntivirus-=20 milterX=EF=BF=BD@anubisf=EF=BF=BD@archivemailm=EF=BF=BD@[root@chaos = /usr/ports]# Mac OS X 10.5, bash: serenity@macbookpro ~ $ cat / cat: /: Is a directory Linux, bash: (21:34) serenity@exscape ~ $ cat / cat: /: Is a directory The same applies to most FS utilities. Is this a feature or not? I =20 find it pretty darn weird. [root@chaos /usr/ports]# cat /etc =EF=BF=BD_=EF=BF=BD=3D syslog.conf [root@chaos /usr/ports]# less /etc /etc is a directory [root@chaos /usr/ports]# more /etc ^=20 C=20 ^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @<=20 80=20 >=20 _=20 ^=20 R=20 <=20 EA=20 >=20 =3D=20 ^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@ =20 ^=20 E=20 ^=20 @^=20 @^=20 @^=20 @^=20 @^=20 @^@^@^@^@^@^@syslog.conf^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ [root@chaos /usr/ports]# grep syslog /etc Binary file /etc matches [root@chaos /usr/ports]# tail /etc =EF=BF=BD_=EF=BF=BD=3D syslog.conf [root@chaos /usr/ports]# head /etc =EF=BF=BD_=EF=BF=BD=3D syslog.conf [root@chaos /usr/ports]# Regards, Thomas=