Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total size of the ~1000 files matching *.txt.
On RHEL and bash, if it matters...
Thanks,
Kent
On Mon, 2007-10-22 at 09:11 -0400, Kent Johnson wrote:
Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total size of the ~1000 files matching *.txt.
du -c *.txt
On Monday 22 October 2007 09:11, Kent Johnson wrote:
Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total size of the ~1000 files matching *.txt.
Ah! Perhaps I
More than you asked for, but here's a command that reports
total space occupied by all files with names ending in .jpg,
recursively from the current directory (but not crossing mount
points) and which is also a gratuitous example of the Process
Substitution facility mentioned in a previous
Kent Johnson wrote:
Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total size of the ~1000 files matching *.txt.
On RHEL and bash, if it matters...
Thanks,
Jim Kuzdrall wrote:
On Monday 22 October 2007 09:11, Kent Johnson wrote:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total size of the ~1000 files matching *.txt.
Ah!
Ooops - that --files0-from= option is apparently
new enough (my du version is 5.97) that it's probably
not widely available. My home system has it, but my
work systems don't... -/
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
Kent Johnson [EMAIL PROTECTED] writes:
Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
Stephen Ryan [EMAIL PROTECTED] writes:
du -c *.txt | tail -1
du prints out the sizes of each of the matching files; '-c' means you
want a total,
On 10/22/07, Stephen Ryan [EMAIL PROTECTED] wrote:
On Mon, 2007-10-22 at 09:11 -0400, Kent Johnson wrote:
Newbie question:
How can I get the total size, in K, of all files in a directory that
match a pattern?
For example, I have a dir with ~5000 files, I would like to know the
total
Hmm, again, certainly not my fist instinct :)
Paul, we embrace diversity here but that is *definitely* OT...
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
On Monday 22 October 2007 09:36, Kent Johnson wrote:
Jim Kuzdrall wrote:
On Monday 22 October 2007 09:11, Kent Johnson wrote:
How can I get the total size, in K, of all files in a directory
that match a pattern?
For example, I have a dir with ~5000 files, I would like to know
the
On 10/22/07, Shawn K. O'Shea [EMAIL PROTECTED] wrote:
Since I know Kent has a Mac and this might be on his laptop, I'd like
to add that this should really be:
du -ck *.txt | tail -1
Since we're on the subject, it should also be noted that du means
*disk usage*. That means du is supposed to
Shawn K. O'Shea wrote:
du -c *.txt | tail -1
Since I know Kent has a Mac and this might be on his laptop, I'd like
to add that this should really be:
du -ck *.txt | tail -1
No, this is a bona fide Linux question :-) it's a Webfaction account.
But thanks for the note!
Kent
On 10/22/07, Michael ODonnell [EMAIL PROTECTED] wrote:
Ooops - that --files0-from= option is apparently
new enough ... that it's probably not widely available.
find . -xdev -type f -name *.jpg -print0 2/dev/null | xargs -0 du
-ch | tail -1
(untested)
-- Ben
On Monday, Oct 22nd 2007 at 10:17 -, quoth Ben Scott:
=On 10/22/07, Shawn K. O'Shea [EMAIL PROTECTED] wrote:
= Since I know Kent has a Mac and this might be on his laptop, I'd like
= to add that this should really be:
= du -ck *.txt | tail -1
=
= Since we're on the subject, it should also be
15 matches
Mail list logo