Solved

How to find size of the folder in UNIX

Posted on 2009-05-10
5
1,118 Views
Last Modified: 2012-05-06
How  to find size of the folder in UNIX where that folder contains sub folders in it?
0
Comment
Question by:umesh4exp
5 Comments
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 100 total points
ID: 24347745
du -ks /folder

gives its size in kilobytes

wmp
0
 
LVL 12

Accepted Solution

by:
geowrian earned 150 total points
ID: 24347749
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 150 total points
ID: 24347754
du folder
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 150 total points
ID: 24347793
du -sh folder
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 100 total points
ID: 24348349
be careful if the dir has a subdir that is a separate filesystem. you may use

du -sxh /path/to/dir
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question