LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-20-2011, 11:50 PM   #1
csa.zhang
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Rep: Reputation: 0
Question How to retrieve the total size of multiple "test" directories?


Yesterday, I have a question! I have a problem, because I always use the test..., when I learn The C Program , I mkdir TesetC directory, and When I learn Perl、bash, etc.. I also use the test.

Now I have many test* directory , and I want to know what size is the test directory ...


help .......
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-21-2011, 12:17 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: Slackware
Posts: 7,173

Rep: Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616Reputation: 2616
Code:
du -h test*
 
Old 09-21-2011, 12:52 AM   #3
byoungguk,kim
LQ Newbie
 
Registered: Sep 2011
Location: Korea
Distribution: Centos,Ubuntu,Debian,Freebsd,Fedora
Posts: 17

Rep: Reputation: Disabled
du -sh test*
 
Old 09-21-2011, 01:19 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hello,

I am reporting this thread to be edited (mainly the subject) because curse words stand out, and doesn't look good, especially for a subject of a thread. Please refrain from doing so in the future.

Cheers,

Josh
 
3 members found this post helpful.
Old 09-22-2011, 01:57 AM   #5
byoungguk,kim
LQ Newbie
 
Registered: Sep 2011
Location: Korea
Distribution: Centos,Ubuntu,Debian,Freebsd,Fedora
Posts: 17

Rep: Reputation: Disabled
I super agree with you.
 
Old 09-22-2011, 02:05 AM   #6
csa.zhang
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Smile Sorry

Quote:
Originally Posted by corp769 View Post
Hello,

I am reporting this thread to be edited (mainly the subject) because curse words stand out, and doesn't look good, especially for a subject of a thread. Please refrain from doing so in the future.

Cheers,

Josh

So sorry!。。。。
 
Old 09-22-2011, 02:30 AM   #7
byoungguk,kim
LQ Newbie
 
Registered: Sep 2011
Location: Korea
Distribution: Centos,Ubuntu,Debian,Freebsd,Fedora
Posts: 17

Rep: Reputation: Disabled
You bet!
 
Old 09-22-2011, 02:41 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Code:
find / -type d -name \*test\* -exec du -ks '{}' \; | sort -n
 
Old 09-23-2011, 08:57 AM   #9
csa.zhang
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Smile Thanks

Quote:
Originally Posted by colucix View Post
Code:
find / -type d -name \*test\* -exec du -ks '{}' \; | sort -n

Thank you very much !!! I am use grep , but the command is so long ....... Thank you!
 
Old 09-23-2011, 07:59 PM   #10
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by csa.zhang View Post
Thank you very much !!! I am use grep , but the command is so long ....... Thank you!
What do you mean by "I am use grep?"

And if you have solved your issue, please mark your thread as solved using the thread tools located at the top of the page, thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Mocha] - I would like to retrieve multiple files at one go. haojam Linux - Newbie 1 07-18-2011 06:40 AM
subtract total numbers of files from 2 directories Michael235 Linux - Newbie 2 03-28-2009 06:49 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
List total number of directories paraiso Linux - Newbie 5 04-18-2005 05:04 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 01:55 PM


All times are GMT -5. The time now is 10:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration