This reminds me of a saying I once heard:

A computer will do exactly what you tell it to do, which is rarely
what you want it to do.

Stupid computers. You should just know what I want and automatically do it.


On 9/30/05, Abigail <abig...@abigail.nl> wrote:
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:
> > > 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 ".*".
>
> I think that's the hatefulness here.  du is "helpfully" prepending ./ to
> everything in the cwd, unlike pretty much every other program in the
> 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




Reply via email to