file size changed after SCP

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers file size changed after SCP
# 1  
Old 02-07-2008
file size changed after SCP

Hi All,

I am having a scriptin that the SCP command is performed . The scp is transfering one file from one location to other.

But after SCP i see the file size is changed from original size . What might be the reason.

Thanks in advance,
# 2  
Old 02-07-2008
scp won't modify file content, like adding headers for example. Double check file sizes on both sides, and run md5sum check against both files.
# 3  
Old 02-07-2008
I am having the status file which shows the size of source file . But he actual source file is removed .

I am not able to compare these two files Smilie
# 4  
Old 02-07-2008
if transmitted in ascii mode, then it may be the conversion of end-of-line characters from one type system to another.

if transmitted in binary, should be the same size.
# 5  
Old 02-07-2008
Originally Posted by arunkumar_mca
I am having the status file which shows the size of source file . But he actual source file is removed .

I am not able to compare these two files Smilie
Well transmit another file, preferably something with a checksum before and after. This should not be happening, its like world crumbling bad news.
# 6  
Old 02-07-2008
Not too much info here. Smilie We need to know how big the source file was and how big the destination files was. And we need to know exactly how you obtained what you think is the file size. I think the most probable answer is that you have a bug your script. Even if your script transfered the file correctly, deleting the source file and then checking to see if the destination file is ok seems backwards.

If the file sizes really are different, I would expect the destination file to be smaller. This would mean that the transfer did not complete and would probably be caused by one of the boxes involved in the transfer rebooting or something like that. Or maybe you ran out of disk space. Stuff like this is the only way I have scp partially transfer a file but ultimately fail.

Also, files have two sizes: how much data is stored and how much disk space was used to store it. Minor changes in the second metric can be caused by using differing file systems. A one byte file could consume 4k of disk space on one box but only 1k of disk space on another. This does not indicate a problem in the transfer. This is why we need to know what numbers you are comparing.
# 7  
Old 02-08-2008
Thanks all ..

Please find the information below

*) I am transfering the file from UNIX to LINUX

This is the output of BDF command when i run it . SO it is having more space

lnx102:sndus:load>) bdf .
Filesystem 1K-blocks Used Available Use% Mounted on
1258291200 6111328 1252179872 1% /sf/buffer

The size of source file that i am trying to transfer is
164283776 in unix

The file that trasfered to linux is with size

I found the wc -l of the transfered file and the total line transfered is 187311
lines .
I have taken the 187311 from source file and comapred the lined all are one and same but the file is not transfered completely .

What might be the possible reason ?..

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

Script to echo "File permissions or ownership changed from required " when accidentally changed.

Hi All, I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :( which have similar names ( /var in root and var of some other directory ).:confused: Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies

3. Shell Programming and Scripting

Check file size before and after scp

Dears does anybody know how to check the file size on server A and server B before and after scp using KSH. Script should be on server A. I will be using it for the below mentioned scenario: I have written a code to fetch files from server A, move it onto server B compress it and save it on... (2 Replies)
Discussion started by: BrownBob
2 Replies

4. UNIX for Dummies Questions & Answers

scp shows size variation

Hi i have folder of 26 GB on server A and want to copy to server B .i used the below commands to check file size and scp copy du -h /folder : its shows 26G on server A from server B: scp -r user@serverA:/folder/* ./copying got initiated and i am checking the file size on server B... (7 Replies)
Discussion started by: rakeshkumar
7 Replies

5. Shell Programming and Scripting

Script to read file size and send email only if size > 0.

Hi Experts, I have a script like $ORACLE_HOME/bin/sqlplus username/password # << ENDSQL set pagesize 0 trim on feedback off verify off echo off newp none timing off set serveroutput on set heading off spool Schemaerrtmp.txt select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Discussion started by: welldone
5 Replies

6. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

7. Shell Programming and Scripting

File size changed

Hi I have many file initial size zero(empty) after some munipulation , one or more file will be greater than zero. I need to send those file names if they return to zero again. Ex. Initially the files are zero size Size filename 0 AAA 0 BBB 0 CCC 0 DDD... (1 Reply)
Discussion started by: Bluetoot
1 Replies

8. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

9. UNIX for Dummies Questions & Answers

Who changed a file?

How can I tell what user last updated a file? (1 Reply)
Discussion started by: kirkm76
1 Replies

10. UNIX for Dummies Questions & Answers

Changed File Names From CD

Hi All: I'm having a problem with transferring files from a CD to my AIX machine. I don't know if I am using the mount command properly. My problem is that when I take a CD that I have burned on my PC over to my AIX machine, whent the CD is mounted the file names have been changed (a more thorough... (3 Replies)
Discussion started by: GoEagles
3 Replies
Login or Register to Ask a Question