Sponsored Content
Full Discussion: size of a directory?
Top Forums UNIX for Dummies Questions & Answers size of a directory? Post 32395 by yls177 on Monday 25th of November 2002 03:29:36 AM
Old 11-25-2002
size of a directory?

hi, say i have the following directory structure a/b/c/d...

can i do df -kt /a/b/c/d and the output will gives me the total space of the directory space in d? or the output will just be the total space of the parent directory a.

hope its clear..
yls177
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Size of a directory

Hi, It would be of great help if anyone can tell me what is the command for getting the size of a directory. Thx a lot in advance Minaz (9 Replies)
Discussion started by: minazk
9 Replies

2. Programming

size of a directory

hai friends I need a program to find the size of a directory.. When i tried to get the size, it always gives the default space allocated for it. How can i findout the exact size of a directory using a c program Thanks in advance Collins (6 Replies)
Discussion started by: collins
6 Replies

3. AIX

size of directory with ls -l

hello When i do a "ls -l" in a directory (Aix 5.3), i have the result : >ls -l total 65635864 -rw-r--r-- 1 lobi system 2559909888 Feb 20 15:06 cible5.7bdat -rw-r--r-- 1 lobi system 1020098870 Feb 20 13:06 cible6.7bdat -rw-r--r-- 1 lobi system 1544789511 Feb 20 11:06 cible9.7bdat -rw-r--r--... (2 Replies)
Discussion started by: pascalbout
2 Replies

4. UNIX for Dummies Questions & Answers

directory size with ls -l

am I right in assuming that in unix a directory size is just information about that directory stored somewhere on the file system, and not a sum of its contents? This is because ls -l gives 1024 as my directory size, when the directory contains many gigs worth of stuff. also, is du -sk dir ... (2 Replies)
Discussion started by: JamesByars
2 Replies

5. Shell Programming and Scripting

size of directory

Hello again; I have a directories and subdirectories in my current directory and i wanna to find the directories( and subdirectories ) which are larger than what user enters as first parameter. find . -type d -size +"$1"c -print > directories.dat I used this command and i am not sure it is... (19 Replies)
Discussion started by: redbeard_06
19 Replies

6. Solaris

Directory size larger than file system size?

Hi, We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB? I have seen this before we an Oracle temp file... (6 Replies)
Discussion started by: sparcman
6 Replies

7. UNIX for Dummies Questions & Answers

directory tree with directory size

find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/' Can someone explain how this works..?? How can i add directory size to be listed in the above command's output..?? (1 Reply)
Discussion started by: vikram3.r
1 Replies

8. Solaris

get directory size

Hi, How to get size of particular directory? Thanks (5 Replies)
Discussion started by: cutefriend
5 Replies

9. Shell Programming and Scripting

How to delete some of the files in the directory, if the directory size limits the specified size

To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies

10. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies
FS_DISKFREE(1)						       AFS Command Reference						    FS_DISKFREE(1)

NAME
       fs_diskfree - Shows data about the partition housing a directory or file

SYNOPSIS
       fs diskfree [-path <dir/file path>+] [-human] [-help]

       fs df [-p <dir/file path>+] [-hu] [-he]

       fs di [-p <dir/file path>+] [-hu] [-he]

DESCRIPTION
       The fs diskfree command formats and displays information about the partition that houses the volume containing the specified directory or
       file, including its size and how much space is currently used.

       To display information about the volume itself, use the fs examine command. The fs examine and fs quota commands also display information
       about a volume.

CAUTIONS
       The partition-related statistics in this command's output do not always agree with the corresponding values in the output of the standard
       UNIX df command. The statistics reported by this command can be up to five minutes old, because the Cache Manager polls the File Server for
       partition information at that frequency. Also, on some operating systems, the df command's report of partition size includes reserved space
       not included in this command's calculation, and so is likely to be about 10% larger.

OPTIONS
       -path <dir/file path>+
	   Names a file or directory that resides on the partition about which to produce output. Partial pathnames are interpreted relative to
	   the current working directory, which is also the default value if this argument is omitted.

       -human
	   Print space in a "human-readable" format. Instead of always printing space in kilobytes, show disk space in kilobytes, megabytes,
	   gigabytes, terabytes, or petabytes, as appropriate.

       -help
	   Prints the online help for this command. All other valid options are ignored.

OUTPUT
       The output reports the following information about the volume and partition that houses each file or directory:

       Volume Name
	   The name of the volume.

       total
	   The partition's total size. If -human is not specified, this value is in kilobytes.

       used
	   The amount of space used on the partition. If -human is not specified, this value is in kilobytes.

       avail
	   The amount of space available on the partition. If -human is not specified, this value is in kilobytes.

       %used
	   The percentage of the partition's total space that is used (the "used" statistic divided by the "kbytes" statistic, times 100).

       If the %used statistic is greater than 90%, it is marked with the string "<<WARNING" at the right margin.

       If the volume is a read-only volume, the output includes information about only one of the partitions that houses it, generally the one on
       the file server machine with the lowest preference rank. To verify which machine the output is referring to, use the vos listvldb command
       to list the volume's locations, and the vos partinfo command to display the size of each one.

EXAMPLES
       The following example shows the output for the partitions housing the volumes "user.smith" and "sun4x_56.bin":

	  % fs diskfree -path /afs/abc.com/usr/smith /afs/abc.com/sun4x_56/bin
	  Volume Name	   total    used   avail     %used
	  user.smith	 4177920 3841258  336662       92% <<WARNING
	  sun4x_56.bin	 4423680 3174500 1249180       72%

PRIVILEGE REQUIRED
       The issuer must have the "r" (read) permission on the ACL of the root directory of the volume that houses the file or directory named by
       the -path argument, and "l" (list) permission on the ACL of each directory that precedes it in the pathname.

SEE ALSO
       fs_examine(1)

COPYRIGHT
       IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

       This documentation is covered by the IBM Public License Version 1.0.  It was converted from HTML to POD by software written by Chas
       Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.

OpenAFS 							    2012-03-26							    FS_DISKFREE(1)
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy