find the foler size?

Unix team sets up a folder to allow me to save files on Unix server, I know the folder path, but I need to know how big of the folder space, there is any command to check folder size or I have to ask Unix admin?

thanks

keepworkingAsked:
Who is Participating?
 
JJSmithCommented:

folders or more specifically directories (in UNIX) - do not have a pre-allocated size. When files are put/created within the directory then is grows.

The size that it has grown to can be measured by commands such as 'du -sk /some/directory/name', which will return the amount of space it currently uses, in kilobytes.

The maximum size it could grow to is based on the available space left in the UNIX file system into which it has been placed. The details of this file system (assuming that you don't know it's name), can be derived from the directory name when passwd to a filesystem command such as df.

For example:

df -k /some/directory/name

should show the space details of the file system in which that directory exists - one of the columns will show the free space.

technically 'your' directory can grow to use up all of that space, assuming nothing else in that filesystem is also growing.

Cheers
JJ
0
 
biraCommented:
you can use du command
man du

or df command to find out the total size of the
filesystem where your directory belongs
0
 
biraCommented:
see also the ulimit  command
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
yuzhCommented:
use:

du -sk /path-to/dir

the output in KB.

man du
to learn more details
0
 
shmuklerCommented:
or you can try $quota
0
 
ahoffmannCommented:
a folder (I guess you mean a directory) has no size
You either can compute the size all the files in that directory and its sub directories use, or you can use du to get the size used occupied in the file system for that directory, or you need to configure quotas to get the maximum allowed size you have on that partition.
0
 
keepworkingAuthor Commented:
thanks for all of reply, my question shows I have no idea about unix
0
 
keepworkingAuthor Commented:
quota

returns:

Disk quotas for user ???: none
0
 
keepworkingAuthor Commented:
ulimit
unlimited

really???
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.