Re: du

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

From: Abigail
Subject: Re: du
Date: 00:25 on 30 Sep 2005
--Ck22u5fw4m2k6hx2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 30, 2005 at 12:01:11AM +0100, Earle Martin wrote:
> I'd like to see how big all the files/directories starting with a '.' in =
my
> home directory are, please.
>=20
> 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.

Indeed, Mail doesn't start with a dot. But it doesn't list Mail, does it?
It lists "./Mail", as it's an entry in ".", which does match ".*".

> earle@pulsar:~$ du -h
> 4.0K    ./Mail
> 12K     ./.ssh
> 1.3M    ./photos/test
> 19M     ./photos
> 12K     ./.mozilla/firefox/nx0jka40.slt/chrome
> ...
>=20
> Well, that's matching... something. I don't understand the sorting order.
> Out of curiosity, let's see what happens if we throw in a wildcard.

Oh, just whatever order readdir is returning.

> earle@pulsar:~$ du -h *
> 8.0K    Calendar
> 2.5M    Desktop
> 1.6M    Incomplete
> 4.0K    Mail
> 36K     accounts
> ...
>=20
> What the hell? Asterisk isn't matching '.'? Gah. I don't care any more.


Indeed. The shell doesn't expand '*' to something that starts with a
leading dot.  If it did, dot-files wouldn't be "hidden".




Abigail

--Ck22u5fw4m2k6hx2
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFDPHfZBOh7Ggo6rasRArx5AKDFXEwTqpLXWnP78dfh1G7WxF9UCQCgrzWu
kioGdBC+69ubCyjhEVi23TE=
=pNG9
-----END PGP SIGNATURE-----

--Ck22u5fw4m2k6hx2--

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