Re: du

[prev] [thread] [next] [lurker] [Date index for 2005/09/30]

From: Abigail
Subject: Re: du
Date: 06:40 on 30 Sep 2005
--b6Y3a1uK/7FdRsLm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 29, 2005 at 06:25:25PM -0700, Michael G Schwern wrote:
> On Fri, Sep 30, 2005 at 01:25:13AM +0200, Abigail wrote:
> > > earle@pulsar:~$ du -h \.*
> > > 4.0K    ./Mail
> > > 12K     ./.ssh
> > > 104K    ./photos/test
> > > ...
> > >=20
> > > Whoa, hold on, "Mail" doesn't begin with a dot. Stop that. Okay, try
> > > again. Maybe I need to quote the dot, or something.
> >=20
> > Indeed, Mail doesn't start with a dot. But it doesn't list Mail, does i=
t?
> > It lists "./Mail", as it's an entry in ".", which does match ".*".
>=20
> I think that's the hatefulness here.  du is "helpfully" prepending ./ to
> everything in the cwd, unlike pretty much every other program in the=20
> universe [1], making life difficult.

No. 'du' is "helpfully" prepending directories in front of files if
it recurses into directories given on the command line. Since the command
line consists of ".*", "." is one directories ".*" expands to.



Abigail

--b6Y3a1uK/7FdRsLm
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFDPM/bBOh7Ggo6rasRAr3bAKCT9daZidTRnYdkwKsdCDZknRje5gCfcdUo
RepSMg23KGWrWrIarOfS7Uo=
=zcJh
-----END PGP SIGNATURE-----

--b6Y3a1uK/7FdRsLm--
There's stuff above here

Generated at 16:00 on 04 Oct 2005 by mariachi 0.52