sftp file size differ


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sftp file size differ
# 1  
Old 10-02-2010
sftp file size differ

Hi,

I have one doubt over sftp.

I am trnasferring a file from server1 to server2 using sftp.
The size of the file shows different in file 1 and file2 after sftp even though it shows same number of byte transferred. I don't understand the problem.

For example:
I have file1 having size 924MB on server1 and I sftped the file to server2, it shows " 100% 924MB 9.5MB/s 01:37" but when I check the size of the file server2, it shows 603M.
Why it is happening?

One Server1

Code:
<server1> cd /dir1/dir2
<server1>ls -lh file1
-rw-rw-r--  1 user1 user1 924M Oct  2 09:22 file1 
<server1>sftp server2
sftp>cd /dir1/dir2
sftp>put file1
Uploading file1 to /dir1/dir2/file1   100%  924MB   9.5MB/s   01:37
sftp> bye

On Server2

Code:
<server2> cd /dir1/dir2
<server2> ls file1
-rw-rw-r--  1 user1 user1 603M Oct  2 09:25 file1
<server2>

Thank you.
# 2  
Old 10-02-2010
Strange !!!


I understand for showing us what happens, you did some manual changes ?!
But how come ls without -l shows long listing.

Code:
ls file1
-rw-rw-r--  1 user1 user1 603M Oct  2 09:25 file1

# 3  
Old 10-03-2010
check md5sum on both servers, if they are same or not
# 4  
Old 10-04-2010
Hi "thegeek"
It was just a mistake....I think you understood my intension.
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. UNIX for Dummies Questions & Answers

Script to check for file size and then sftp

noted down (44 Replies)
Discussion started by: mirwasim
44 Replies

3. Shell Programming and Scripting

List the file names that differ

Hello, I have two directories - prev and current . They both have same multiple subdirectories and files. Now the current directory can have some updated files and some new files added that is not in prev. I want to find the list of file names that differ. I am doing this because i can not... (2 Replies)
Discussion started by: jakSun8
2 Replies

4. Shell Programming and Scripting

SFTP - Get size of file on remote server

Hi, I have a requirement where I need to do SFTP connection to remote server, get the size of the file on remote server and depending on the size, i need to get the file onto local server. Is there any command in SFTP to get the size of the file. I found one in FTP but not in SFTP (2 Replies)
Discussion started by: forums123456
2 Replies

5. Shell Programming and Scripting

sftp Invalid buffer size

For the above one I am getting an error like Invalid buffer size ...Could some one help (3 Replies)
Discussion started by: infernalhell
3 Replies

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

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

8. Shell Programming and Scripting

sftp file size limit

Hi, Can some one please tell me the file size limit (if any) while using sftp I am trying to transfer a file ( size is almost 350 MB ) but it fails as shown below. sftp> put file1 ./file1 Uploading file1 to /dir1/./file1 file1 25% 100MB 10.2MB/s 00:28 ETA Couldn't write to remote... (6 Replies)
Discussion started by: vikash_k
6 Replies

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

10. UNIX for Dummies Questions & Answers

diff on c-source file always returns "files differ"

I have a c-source file that is evidently seen by unix as a binary file. When doing a diff between it and older versions with substantial differences, diff will only return "files differ". I have tried cat-ing the file to another file; tried using the "-h" on the diff; I have tried ftp-ing it... (7 Replies)
Discussion started by: C-Prog-Man
7 Replies
Login or Register to Ask a Question