size of a folder ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers size of a folder ?
# 1  
Old 06-01-2009
size of a folder ?

hi,

is possible to calculate the size of a folder using ls ?

ls -s works only for files..

thanks
# 2  
Old 06-01-2009
thusi$ ls -l

...
...
...
...

thusi$ du -sh <directory name>
# 3  
Old 06-01-2009
maybe also du -mhs folder
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Complex Query regarding folder size

Hi, I provide the path to a folder. I would like so drill in each folder inside the folder i gave and show me the size in human readable form du -sh <folder-name> of the top 8 folders with maximum sizes. For example: Path of the folder: "/opt/app/myapp" has these directories. ls... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Shell Programming and Scripting

Getting folder more than 100K size

Hi , I am trying to get the folder details having size more than sme specified value and also the name of the folder should be like TEST. so 1. In the current directory search for all the folders having name like TEST 2. Print the list of the folder names having size more than 100... (3 Replies)
Discussion started by: Anupam_Halder
3 Replies

3. Shell Programming and Scripting

Folder level size monitoring

Hi All, I have a requirement to monitor the sub-directories under /home in a way that if the the folder size increases by 30 GB in a span of like an hour then it needs to send email alerts listing what as the actual size was and what's the current size which the subject listing the sub-directory... (25 Replies)
Discussion started by: Shailesh6
25 Replies

4. Red Hat

Sorting folder size not working

I am using du -h --max-depth=2 to get list of folders by size upto 2 levels down. Problem is I am not able to sort them in max folder size. Normally this can be achieved by using du -k | sort -nr * but I can't use it here since it conflicts (the -s argument) with the --max-depth=2 argument. ... (1 Reply)
Discussion started by: rockf1bull
1 Replies

5. Solaris

Need to know the users folder size

Hi Forum, I need to know the size of some user home folders. I've exported an account list from an Active Directory and wrote it into a file like: user_1 user_2 user... user_n and tried "du -sh < filename", which doesn't work. Get no results. I don't need the size of all home... (3 Replies)
Discussion started by: borsti007
3 Replies

6. UNIX for Dummies Questions & Answers

I am trying to get the total size of a folder?

I am trying to get the total size of the folder using the below command but its not working. any ideas? du -bc <foldername>/|grep total|tr -s " "|cut -d" " -f1 the output i am getting is 78996 total but i just want it to be as 78996 please help (3 Replies)
Discussion started by: classic
3 Replies

7. Shell Programming and Scripting

Split folder into dvd size

Hello everyone, I have a big folder in a linux server that contains dozen of big files (total folder size ~ 50 GB) I have a couple of files of 2.5 GB and some others from 100 MB to 1 GB. (that said it's obvious that it's impossible having two 2.5 GB files in one dvd) The purpose is to... (7 Replies)
Discussion started by: cabrao
7 Replies

8. UNIX for Dummies Questions & Answers

Need help in finding Folder Size

Hi, I would like to find the size of a folder. When I run the command du -k It is going through all the sub-folder and files and taking really much time. Is there any command to get the complete directory size without showing the sub-folder and file size. Appreciate your response. ... (3 Replies)
Discussion started by: TonySolarisAdmi
3 Replies

9. UNIX for Dummies Questions & Answers

Limit Folder Size

Is there a way to limit a certain folder size(e.g. Documents, Desktop)? :) (2 Replies)
Discussion started by: tisdmin
2 Replies

10. Shell Programming and Scripting

Scripting to find the size of the folder

Will any body help me by writing a script in unix to the find out the size of the Main folder which has some 5 to 6 subfolders which in turn has some file in each of these subfolders regards victorvvk (2 Replies)
Discussion started by: victorvvk
2 Replies
Login or Register to Ask a Question