Sponsored Content
Operating Systems AIX why a directory size is different on two servers? Post 302296079 by jim mcnamara on Tuesday 10th of March 2009 10:00:36 AM
Old 03-10-2009
Oh.

The size of a directory file has very little to do with what is actuall in the directory.
That type of file just grows in size. If you remove some files - it stays the same size.
So as an explanation - how about at one time the 1024 size directory had more files than it does now? When copied to another box it required 512 bytes for the new directory.
 

10 More Discussions You Might Find Interesting

1. Solaris

How to find size of data trasnfered between 2 servers ?

Hi, I have setup 2 Sun Solaris server at my home. I put them in network.. Network is ok. How can I find that how much data is transfered between these 2 servers and on specific port ? Thanks NeeleshG (7 Replies)
Discussion started by: neel.gurjar
7 Replies

2. Filesystems, Disks and Memory

Shared Home directory between Unix servers

Hi Im working in an environment where 2 production and 2 testing unix servers are used.. All these servers share the same home directory.. how is it done where would the home directory be located (0 Replies)
Discussion started by: raghav288
0 Replies

3. Shell Programming and Scripting

How to check directory exist on servers

There are many servers and their directory structer should be exactly the same. To check the directory path for all servers, I wrote a script. #! /bin/ksh ARRAY_DIRECTORIES="/c/dev/custom/bin" ARRAY_DIRECTORIES="/c/dev/db/custom/src" ARRAY_ENV="remoteName200" ARRAY_ENV="remoteName201"... (2 Replies)
Discussion started by: weonpc
2 Replies

4. Shell Programming and Scripting

to compare total directory structure and get sizes of all f on two different servers

Hello every one, Iam newbie to this forum and shell programming &scripting. i needed to compare each and every folder of two separate servers. Actually I have copied some directory structure from one server to second server, to build on second server the files all should be copied... (3 Replies)
Discussion started by: mannam srinivas
3 Replies

5. 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

6. 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

7. Solaris

directory compare in two different servers

How can we get the directory tree along with the size in two different servers and find the difference between the list..?? Eg, Server1 dirTree1 -size Server 2 dirTree2 -size how can we find the directory tree with its size, and find the difference, where the servers are different... (1 Reply)
Discussion started by: vikram3.r
1 Replies

8. Shell Programming and Scripting

Comparing files names in directory over two servers

Hi folks I need to write a shell script to check whether source and the destination has the same files. The source and destination are over two servers and connecting through ssh. It should even compare the date i.e, the complete file name, date stamp and size should match. Should list out all the... (3 Replies)
Discussion started by: Olivia
3 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
du(1)								   User Commands							     du(1)

NAME
du - summarize disk usage SYNOPSIS
/usr/bin/du [-adr] [-k | -h] [-H | -L] [-o | -s] [file ...] /usr/xpg4/bin/du [-a | -s] [-k | -h] [-H | -L] [-rx] [file ...] DESCRIPTION
The du utility writes to standard output the size of the file space allocated to, and the size of the file space allocated to each subdi- rectory of, the file hierarchy rooted in each of the specified files. The size of the file space allocated to a file of type directory is defined as the sum total of space allocated to all files in the file hierarchy rooted in the directory plus the space allocated to the directory itself. This sum will include the space allocated to any extended attributes encountered. Files with multiple links will be counted and written for only one entry. The directory entry that is selected in the report is unspeci- fied. By default, file sizes are written in 512-byte units, rounded up to the next 512-byte unit. /usr/xpg4/bin/du When du cannot obtain file attributes or read directories (see stat(2)), it will report an error condition and the final exit status will be affected. OPTIONS
The following options are supported for /usr/bin/du and /usr/xpg4/bin/du: -a In addition to the default output, report the size of each file not of type directory in the file hierarchy rooted in the speci- fied file. Regardless of the presence of the -a option, non-directories given as file operands will always be listed. -h All sizes are scaled to a human readable format, for example, 14K, 234M, 2.7G, or 3.0T. Scaling is done by repetitively dividing by 1024. -H If a symbolic link to a directory is specified on the command line, process the symbolic link by using the directory which the symbolic link references, rather than the link itself. -k Write the files sizes in units of 1024 bytes, rather than the default 512-byte units. -L Process symbolic links by using the file or directory which the symbolic link references, rather than the link itself. -s Instead of the default output, report only the total sum for each of the specified files. Specifying more than one of the options in the mutually exclusive pair, -H and -L, is not considered an error. The last option specified determines the output format. /usr/bin/du The following options are supported for /usr/bin/du only: -d Do not cross filesystem boundaries. For example, du -d / reports usage only on the root partition. -o Do not add child directories' usage to a parent's total. Without this option, the usage listed for a particular directory is the space taken by the files in that directory, as well as the files in all directories beneath it. This option does nothing if -s is used. -r Generate messages about directories that cannot be read, files that cannot be opened, and so forth, rather than being silent (the default). /usr/xpg4/bin/du The following options are supported for /usr/xpg4/bin/du only: -r By default, generate messages about directories that cannot be read, files that cannot be opened, and so forth. -x When evaluating file sizes, evaluate only those files that have the same device as the file specified by the file operand. OPERANDS
The following operand is supported: file The path name of a file whose size is to be written. If no file is specified, the current directory is used. OUTPUT
The output from du consists of the amount of the space allocated to a file and the name of the file. USAGE
See largefile(5) for the description of the behavior of du when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of du: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/bin/du +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ /usr/xpg4/bin/du +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
ls(1), stat(2), attributes(5), environ(5), fsattr(5), largefile(5), standards(5) System Administration Guide: Basic Administration NOTES
A file with two or more links is counted only once. If, however, there are links between files in different directories where the directo- ries are on separate branches of the file system hierarchy, du will count the excess files more than once. Files containing holes will result in an incorrect block count. SunOS 5.10 5 Oct 2003 du(1)
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy