scp shows size variation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers scp shows size variation
# 1  
Old 11-03-2011
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
Code:
du -h /folder :  its shows 26G on server A

from server B:
Code:
scp -r user@serverA:/folder/* ./

copying got initiated and i am checking the file size on server B using

Code:
du -h /folder :  now its shows 33G : still copying is going...dont know when it stops

my question is why there is size variation ?
# 2  
Old 11-03-2011
Do you have any symbolic links underneath /folder? Or sparse files?

You might want to consider using rsync to copy the files.
# 3  
Old 11-03-2011
From man scp:
Quote:
...
-r Recursively copy entire directories. Note that scp follows symbolic links encountered in the tree traversal.
...
# 4  
Old 11-03-2011
yes i have symbolic links m.d.ludwig

---------- Post updated at 07:42 AM ---------- Previous update was at 07:32 AM ----------

i am making tar of the folder on server A and then i will copy it to server B , is it the right way ?
# 5  
Old 11-03-2011
Sounds good if your user is allowed to create such large files and if the file system is capable of such large files.

Last edited by zaxxon; 11-03-2011 at 09:51 AM.. Reason: Rephrasing, adding details
# 6  
Old 11-03-2011
Why not transfer in one go ? especially if you have links...
Can you use .rhosts during your copy?
# 7  
Old 11-03-2011
after verification i found that m.d.ludwig is right , all the symbolic links were copying as normal files it increased my space

i have added the keys in .ssh/known_hosts , can you please tell me about .rhosts or direct me the location to read more about .
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. UNIX for Dummies Questions & Answers

[Solved] Slight variation from the desired results

Hello, I am writing a small one liner script to display the tables in my database. I am working with Centos 5.5 and postgresql the command is "psql -c "\dt" | awk '{print$3}'" I just want the 3rd column from the result set, but now the problem is I am getting the third column but with... (3 Replies)
Discussion started by: nnani
3 Replies

3. Shell Programming and Scripting

awk variation question

I have a file like this: ASSPASVFETQY,hTRBV12-4,hTRBJ2-5,2 ASSPASTGGDYGYT,hTRBV18,hTRBJ1-2,2 ASSPASGDGYT,hTRBV5-1,hTRBJ1-2,2 ASSPASFPEDTQY,hTRBV27,hTRBJ2-3,2 ASSPARVNYGYT,hTRBV5-1,hTRBJ1-2,2 ASSPARTSGGLNEQF,hTRBV6-4,hTRBJ2-1,2 ASSPARQSYNEQF,hTRBV11-1,hTRBJ2-1,2... (4 Replies)
Discussion started by: xshang
4 Replies

4. Shell Programming and Scripting

Symbolic link to an empty file shows size 2

Hi, I have created an empty file and a symbolic link to a file. But when I issue the following commands, I am getting the output 2. stat -c "%s" linkfile du -hb linkfile Why this is happening? (4 Replies)
Discussion started by: royalibrahim
4 Replies

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

6. UNIX for Dummies Questions & Answers

top's USER column width variation

hello, does anyone know how to expand the column width so it could contain full USER cell and not cut it in top ? Now it has eleven symbols but I can see only eight actualy I found only PID, PPID and %CPU columns variation possibilities in changelog (procps v.3.2.5). thanks in advance. (1 Reply)
Discussion started by: bugs_moran
1 Replies

7. UNIX for Dummies Questions & Answers

performance variation between two commands

does it make any difference in terms of performance while using any of the below mentioned code for the same requirement which processes continuously coming files in the I/P directory . Please provide ur viewws ls -tr $SAPRESPONSEGOFILE | sed "s/go/dat/g" | while read SAPRESPONSEFILES... (3 Replies)
Discussion started by: praviper
3 Replies

8. UNIX for Dummies Questions & Answers

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, Arunkumar (11 Replies)
Discussion started by: arunkumar_mca
11 Replies

9. UNIX for Advanced & Expert Users

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. (15 Replies)
Discussion started by: KhawHL
15 Replies

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