From: Jack on 8 May 2010 18:15 I need to get the size of a directory with several sub-directories. Each sub-directory may also have sub-directories. How to do it? Thanks.
From: Janis Papanagnou on 8 May 2010 18:24 Jack wrote: > I need to get the size of a directory with several sub-directories. > Each sub-directory may also have sub-directories. How to do it? du -k your_top_dir_path Janis > > Thanks.
From: Seebs on 8 May 2010 19:16 On 2010-05-08, Jack <junw2000(a)gmail.com> wrote: > I need to get the size of a directory with several sub-directories. > Each sub-directory may also have sub-directories. How to do it? Define "size". "du" may well do what you need. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Jack on 10 May 2010 03:17 On May 8, 3:24 pm, Janis Papanagnou <janis_papanag...(a)hotmail.com> wrote: > Jack wrote: > > I need to get the size of a directory with several sub-directories. > > Each sub-directory may also have sub-directories. How to do it? > > du -k your_top_dir_path > > Janis > > > > > Thanks. I tried "du -k my_dir" and found that it lists the size of each file in the directory. What I want is the size (usage of disk space) of the whole directory. I do not need the size of each file, For example, if the directory occupies 20GB on the disk, I only need to know the number 20GB, which should be the summation of the size of all the files. Is there any way to do it? Thanks.
From: Stephane CHAZELAS on 10 May 2010 03:39 2010-05-10, 00:17(-07), Jack: [...] > I tried "du -k my_dir" and found that it lists the size of each file > in the directory. What I want is the size (usage of disk space) of the > whole directory. I do not need the size of each file, For example, if > the directory occupies 20GB on the disk, I only need to know the > number 20GB, which should be the summation of the size of all the > files. Is there any way to do it? [...] Try "man du" -- Stéphane
|
Next
|
Last
Pages: 1 2 Prev: sed replacing space/(s) with a tab in one place only Next: NETWORK MARKETING |