Date: Tue, 9 Jun 2009 09:04:40 +0200 From: Thomas Backman <serenity@exscape.org> To: FreeBSD Current <freebsd-current@freebsd.org> Subject: FS utils treates directories as files? Message-ID: <B7437F9F-A8BF-4F49-AAE4-9B93B62B6223@exscape.org>
next in thread | raw e-mail | index | archive | help
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=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B7437F9F-A8BF-4F49-AAE4-9B93B62B6223>