Re: total size of files that match a given mask
- From: "Michael C." <mjchappell@xxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 07:07:56 GMT
On Mon, 10 Jul 2006 16:06:30 -0400,
Chris F.A. Johnson <cfajohnson@xxxxxxxxx> wrote:
On 2006-07-10, Michael C. wrote:Combined size not number, though that is potentially useful, as it
Is there a command that will give you the combined size of the
files that match a given file mask? I've gotten into the habit
of moving the files to a temporary directory and using 'du', but
am hoping there is a more practical way. CLI only please, I'm
already aware that many file managers allow this.
set -- a*.txt
echo "There are $# .txt files in $PWD"
is significantly faster than:
$ echo "There are `ls -1 a*.txt |wc -l` .txt files in $PWD"
"du -ch a*.txt", does what I need.
Thanks,
Michael C.
--
mcsuper5@xxxxxxxx http://mcsuper5.freeshell.org/
Men do not stumble over mountains but molehills.
.
- References:
- total size of files that match a given mask
- From: Michael C.
- Re: total size of files that match a given mask
- From: Chris F.A. Johnson
- total size of files that match a given mask
- Prev by Date: Re: List-based login screen?
- Next by Date: Re: Software vs. Hardware RAID 1
- Previous by thread: Re: total size of files that match a given mask
- Next by thread: Re: ubuntu
- Index(es):
Relevant Pages
|