LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-13-2005, 12:27 PM   #1
FarAway
LQ Newbie
 
Registered: Jul 2004
Posts: 18

Rep: Reputation: 0
Print size of directory


Hi all,

I have this question about the command ls.

Let say under the current directory /home/aaa/ i have directories which contain files and more directories. Which ls command can i use to print out the total size of the current directory?

I tried to use ls -lR, but it seems printed out a very long list, which contains every files under every directory, which is not i want.

Thanks in advance.
 
Old 07-13-2005, 01:15 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
du.

For example,
Code:
du -sh .
Prints the total size of the current working directory and all subdirectories in a human readable form, such as 2.1G for 2.1 gigabytes. 'man du' for details.
 
  


Reply



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
Program to print the size of a web file justintime32 Linux - Software 1 06-18-2005 03:19 PM
Redhat7.2 cann't print A3 size BRAHmS Linux - General 0 01-20-2005 07:06 PM
how to get print size changed dhamle Linux - General 1 07-26-2004 05:46 PM
print listing of directory harnadem Linux - Newbie 2 04-25-2004 09:35 PM
samba/cups print job size carpman Linux - Networking 1 01-25-2002 05:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:34 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
Open Source Consulting | Domain Registration