Re: du

2005-10-01 Thread Smylers
$ touch aa bb '[ab]*' '[ef]*' Then this glob obviously displays the matching files (the fact that there is also a file of that name doesn't come into play): $ du [ab]* 0 aa 0 bb This glob doesn't match anything so is passed straight through to du, which can't find a file of that name

Re: du

2005-10-01 Thread Luke Kanies
On Fri, 30 Sep 2005, Smylers wrote: For example, suppose this directory contents: $ mkdir new $ cd new $ touch aa bb '[ab]*' '[ef]*' I don't know if that's hateful, but I can definitively state that it's evil. -- SCSI is *not* magic. There are fundamental technical reasons

Re: du

2005-10-01 Thread Smylers
Luke Kanies writes: On Fri, 30 Sep 2005, Smylers wrote: For example, suppose this directory contents: $ mkdir new $ cd new $ touch aa bb '[ab]*' '[ef]*' I don't know if that's hateful, but I can definitively state that it's evil. Well I did say that it's a pathological

Re: du

2005-09-30 Thread Aaron J. Grier
On Fri, Sep 30, 2005 at 01:39:55PM -0500, Luke Kanies wrote: du -dsk * | sudo sort -n why do you need to sudo to run sort from a pipe? sudo du -dsk * | sort -n I could understand... but there's no reason sort needs to be priviledged, or am I missing something? -- Aaron J. Grier

Re: du

2005-09-30 Thread Juerd
Earle Martin skribis 2005-09-30 0:01 (+0100): I'd like to see how big all the files/directories starting with a '.' in my home directory are, please. [...] What the hell? Asterisk isn't matching '.'? Gah. I don't care any more. Glob patterns are interpolated by the shell, not the du program

Re: du

2005-09-30 Thread Peter da Silva
The zsh documentation specifies, that No filename generation pattern matches the files `.' or `..'. That's not just hateful, that's utterly evil. Not that I really needed another reason to hate zsh, of course. I've got a couple of co-workers who use zsh, and script in it. I don't have zsh

Re: du

2005-09-30 Thread Sébastien Aperghis-Tramoni
Earle Martin hates-softw...@downlode.org wrote: I'd like to see how big all the files/directories starting with a '.' in my home directory are, please. I usually use du -hs .??* in order to list all hidden files except current and parent directories. HTH -- Sébastien Aperghis-Tramoni

Re: du

2005-09-30 Thread Luke Kanies
On Fri, 30 Sep 2005, Abigail wrote: On Fri, Sep 30, 2005 at 11:06:26AM +0200, S?bastien Aperghis-Tramoni wrote: I usually use du -hs .??* in order to list all hidden files except current and parent directories. I happen to have a directory .S in my home directory - which would

Re: du

2005-09-30 Thread A. Pagaltzis
* Luke Kanies l...@madstop.com [2005-09-30 17:25]: Because, of course, the above line will result in crap you don't want if you don't happen to have directories that match your strings: $ echo .[^.]* ..?* .svn ..?* shopt -s nullglob At least in a vaguely contemporary bash.

Re: du

2005-09-30 Thread A. Pagaltzis
* Aaron Crane hate...@aaroncrane.co.uk [2005-09-30 18:30]: Or if the extensions have more than a single character, bash lets you do this: shopt -s extglob # highly recommended anyway ls *.@(c|cc|cpp|h|o) On that tangent, trying to get the !() extended pattern to do what you mean is also