Re: How to find total MB of a directory plus all subdirectories



Nigel Henry wrote:
I have a question about du though. On the other machine where I
wanted to find out the size of my soundfiles directory, du couldn't
access it because it was named "Sounds Library" , without the
quotes. I renamed it putting a hyphen between the 2 words, and then
du accessed the directory ok, but all of the subdirectories are
multi worded without any hyphens, and du didn't have any problem
with them. Any reason why du will not access the main directory
without hyphenated words, and yet has no problem with all the
subdirectories?

It's not a big deal, just puzzling.

It's not likely a du issue, but a matter of quoting the dir.

btw. The now Sounds-Library (with the hyphen) is on a separate
harddrive so I have to run du as.

du -sh /mnt/hdb5/Sounds-Library

If you left it as Sounds Library you could use du as:

du -sh "/mnt/hdb5/Sounds Library"

or

du -sh /mnt/hdb5/Sounds\ Library

If you just use:

du -sh /mnt/hdb5/Sounds Library

then the shell passes du two separate arguments, /mnt/hdb5/Sounds and
Library; neither of which are likely to exist or be the intended
arguments.

HTH,

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
When I think about all the crap I learned in high school ... it's a
wonder I can think at all.
-- Paul Simon

Attachment: pgp5lhOYCaXhS.pgp
Description: PGP signature

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Relevant Pages

  • Re: How to find total MB of a directory plus all subdirectories
    ... On Thursday 08 March 2007 20:49, Todd Zullinger wrote: ... but all of the subdirectories are ... multi worded without any hyphens, and du didn't have any problem ... without hyphenated words, and yet has no problem with all the ...
    (Fedora)
  • Re: How to find total MB of a directory plus all subdirectories
    ... out the size of my soundfiles directory, du couldn't access it because it was ... subdirectories are multi worded without any hyphens, ... without hyphenated words, and yet has no problem with all the subdirectories? ...
    (Fedora)
  • Re: How to find total MB of a directory plus all subdirectories
    ... On Wednesday 07 March 2007 04:32, Bruno Wolff III wrote: ... named Sounds Library, this contains many subdirectories, which contain ... subdirectories are multi worded without any hyphens, ... without hyphenated words, and yet has no problem with all the subdirectories? ...
    (Fedora)
  • Fw: Variable Replacement Question
    ... Subject: Variable Replacement Question ... WITHOUT modifying the the first and last hyphens. ... One way might be to strip all quotes, then add the leading & trailing back ... and both of these do preserve the trailing spaces. ...
    (comp.unix.sco.misc)
  • Re: 16000 hyphens die
    ... Hyphens, after 16,000 previously hyphenated words, ... latest version of the shorter Oxford English ... "diarrhea" as an alternative spelling, ...
    (alt.usage.english)