why a directory size is different on two servers?


 
Thread Tools Search this Thread
Operating Systems AIX why a directory size is different on two servers?
# 1  
Old 03-06-2009
why a directory size is different on two servers?

I had a directory dir001 on server a, and its size was 1024 bytes, and below was its content.

$ ls -li
total 184
30728 -rwxr-x--- 1 user1 grp1 2187 Feb 26 14:33 Exxxxxx
30729 -rwxr-x--- 1 user1 grp1 22197 Feb 26 14:33 Sxxxxxx
30730 -rwxr-x--- 1 user1 grp1 2153 Feb 26 14:33 Sxxxxxx
30733 -rwxr-x--- 1 user1 grp1 12493 Feb 26 14:33 Sxxxxxx
30734 -rwxr-x--- 1 user1 grp1 2900 Feb 26 14:33 Sxxxxxx
30732 -rwxr-x--- 1 user1 grp1 3340 Feb 26 14:33 Sxxxxxx
30736 -rwxr-x--- 1 user1 grp1 9464 Feb 26 14:33 Txxxxxx
30737 -rwxr-x--- 1 user1 grp1 2173 Feb 26 14:33 Txxxxxx
30740 -rw-r----- 1 user1 grp1 15444 Feb 27 16:38 Txxxxxx
30739 -rwxr-x--- 1 user1 grp1 2416 Feb 26 14:33 Txxxxxx

then i had created its archive by tar and transfered it to server b through sftp, but this time its size was 512 bytes, and below was its content.

# ls -li
total 184
108550 -rwxr-x--- 1 user1 grp1 2187 Feb 26 14:33 Exxxxxx
108551 -rwxr-x--- 1 user1 grp1 22197 Feb 26 14:33 Sxxxxxx
108552 -rwxr-x--- 1 user1 grp1 2153 Feb 26 14:33 Sxxxxxx
108554 -rwxr-x--- 1 user1 grp1 12493 Feb 26 14:33 Sxxxxxx
108555 -rwxr-x--- 1 user1 grp1 2900 Feb 26 14:33 Sxxxxxx
108553 -rwxr-x--- 1 user1 grp1 3340 Feb 26 14:33 Sxxxxxx
108556 -rwxr-x--- 1 user1 grp1 9464 Feb 26 14:33 Txxxxxx
108557 -rwxr-x--- 1 user1 grp1 2173 Feb 26 14:33 Txxxxxx
108559 -rw-r----- 1 user1 grp1 15444 Feb 27 16:38 Txxxxxx
108558 -rwxr-x--- 1 user1 grp1 2416 Feb 26 14:33 Txxxxxx


does anybody know the reason and how to detect? can this command istat <i-node> <file system> meet the requirement?
# 2  
Old 03-10-2009
Where do you see different size?
If I take the first file:
30728 -rwxr-x--- 1 user1 grp1 2187 Feb 26 14:33 Exxxxxx
And compare with:
108550 -rwxr-x--- 1 user1 grp1 2187 Feb 26 14:33 Exxxxxx

To me they seem very identical indeed - or Im still sleeping...
# 3  
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.
# 4  
Old 04-15-2009
thank you jim mcnamara, your judgement is quite right.

i've done some tests according to your advise and they are very positive.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

10. 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
Login or Register to Ask a Question