du -k shows different size in two nodes

After rcp -rp from remote host, using du -k to verify the file size but total file size have different size. Check on individual file, file size is correct.

How can I confirm on the file size after ftp?

Pls advise.
Thank you.

cluster size?

all you are interested in is the exact byte length of the file and possibly it's MD5 signature, the space on disk is much less of a concern.

Sorry, I'm using wrong categories - UNIX for advanced & Expert Users where I should use the basic one..

This is one of the example.

SOURCE
# pwd
/linxnet/server2/dist/0101/HA118224F_ACDC
# ls -al
total 624
drwxr-xr-x 2 oraprod staff 8192 Nov 23 2001 .
drwxr-xr-x 7 oraprod staff 8192 Nov 23 2001 ..
-rw-r--r-- 1 oraprod staff 44738 Nov 23 2001 HA118224F_ACDC_VM34694_4JL4516_LTX05-1.hist
-rw-r--r-- 1 oraprod staff 46663 Nov 23 2001 HA118224F_ACDC_VM34786_4JL4516_LTX05-1.hist
-rw-r--r-- 1 oraprod staff 49832 Nov 23 2001 HA118224F_ACDC_VM34804_4JL4516_LTX05-1.hist
-rw-r--r-- 1 oraprod staff 46307 Nov 23 2001 HA118224F_ACDC_VM35770_4JL4455_LTX05-1.hist
-rw-r--r-- 1 oraprod staff 46562 Nov 23 2001 HA118224F_ACDC_VM35800_4JL4455_LTX05-1.hist
-rw-r--r-- 1 oraprod staff 46670 Nov 23 2001 HA118224F_ACDC_VM35850_4JL4455_LTX05-1.hist

# du -k
304

TARGET
total 558
drwxr-xr-x 2 root other 512 Nov 23 2001 .
drwxr-xr-x 7 root other 512 Nov 23 2001 ..
-rw-r--r-- 1 root other 44738 Nov 23 2001 HA118224F_ACDC_VM34694_4JL4516_LTX05-1.hist
-rw-r--r-- 1 root other 46663 Nov 23 2001 HA118224F_ACDC_VM34786_4JL4516_LTX05-1.hist
-rw-r--r-- 1 root other 49832 Nov 23 2001 HA118224F_ACDC_VM34804_4JL4516_LTX05-1.hist
-rw-r--r-- 1 root other 46307 Nov 23 2001 HA118224F_ACDC_VM35770_4JL4455_LTX05-1.hist
-rw-r--r-- 1 root other 46562 Nov 23 2001 HA118224F_ACDC_VM35800_4JL4455_LTX05-1.hist
-rw-r--r-- 1 root other 46670 Nov 23 2001 HA118224F_ACDC_VM35850_4JL4455_LTX05-1.hist

# du -k
278 .

Did you notice?

     When the sizes of the files in a  directory  are  listed,  a
     total   count  of  blocks,  including  indirect  blocks,  is
     printed.

Try the following..

ls -ld *  | wc -l
ls -ld .*  | wc -l

on each.

both node shows the same:

# ls -ld * | wc -l
6
# ls -ld .* | wc -l
2

So

(a) you have all the files

(b) the file byte lengths are correct.

I would count that as success.

SOURCEtotal 624
TARGETtotal 558

Yes, I noticed.. can u pls explain? Thanks.

It says block size, not sector size.

What are the two systems? What are the disk formats/file systems, and how big are the disks?

Sun Solaris.

Source: - veritas file system
/dev/vx/dsk/devappdg1/vol04
60G 16G 43G 28% /linxnet/server2

Target:
/dev/md/dsk/d54 59G 13G 46G 23% /linxnet/server2

Thanks for your advise.

Is this problem due to different file system?

Is it actually a problem, or just a fact?

Besides checking each file size, how can I confirm ftp of all files is correct since this is the fact? Need your advise. Thank you.

The best way is to get an MD5 checksum generated at the server end, then you can compare it at the client end with the MD5 of whatever you downloaded (and after confirming the lengths are correct).

man md5

You'll see this technique used on the internet where, for example, CDs will have both an iso and a md5 checksum file.

You can use cksum as well. It might be more commonly available than md5sum.

If using Solaris 10 md5 is also available using the digest command.

# digest -a md5 /etc/hosts
e2c417b2449d695581c83be61c7380f5

Hi All,
Thanks for the response.

HOw should I verify those files that already copied over from different node? As there are more than 100 files in one sub directory, what command should I use to verify the file size in one directory instead of checking each individual file size?