Solved

find the foler size?

Posted on 2006-07-05
9
1,541 Views
Last Modified: 2010-04-22
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

0
Comment
Question by:keepworking
9 Comments
 
LVL 6

Assisted Solution

by:bira
bira earned 40 total points
ID: 17046172
you can use du command
man du

or df command to find out the total size of the
filesystem where your directory belongs
0
 
LVL 6

Assisted Solution

by:bira
bira earned 40 total points
ID: 17046256
see also the ulimit  command
0
 
LVL 6

Accepted Solution

by:
JJSmith earned 400 total points
ID: 17046977

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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 20 total points
ID: 17047466
use:

du -sk /path-to/dir

the output in KB.

man du
to learn more details
0
 
LVL 1

Assisted Solution

by:shmukler
shmukler earned 20 total points
ID: 17048283
or you can try $quota
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 20 total points
ID: 17052778
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
 

Author Comment

by:keepworking
ID: 17053111
thanks for all of reply, my question shows I have no idea about unix
0
 

Author Comment

by:keepworking
ID: 17053287
quota

returns:

Disk quotas for user ???: none
0
 

Author Comment

by:keepworking
ID: 17053296
ulimit
unlimited

really???
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AIX  NFS  question 1 138
Most secure Linux or x86 Unix that are least prone to ransomware/malware 24 110
unix example issues 18 90
Wrap Oraccle SQL*Plus executable Command 4 84
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

776 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