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.
> 
> ea...@pulsar:~$ du -h \.*
> 4.0K    ./Mail
> 12K     ./.ssh
> 104K    ./photos/test
> ...
> 
> 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 ".*".

> ea...@pulsar:~$ du -h
> 4.0K    ./Mail
> 12K     ./.ssh
> 1.3M    ./photos/test
> 19M     ./photos
> 12K     ./.mozilla/firefox/nx0jka40.slt/chrome
> ...
> 
> 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.

> ea...@pulsar:~$ du -h *
> 8.0K    Calendar
> 2.5M    Desktop
> 1.6M    Incomplete
> 4.0K    Mail
> 36K     accounts
> ...
> 
> 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

Attachment: pgpBidBiJHPV1.pgp
Description: PGP signature

Reply via email to