02-07-2008
Not too much info here.
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.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
How can I tell what user last updated a file? (1 Reply)
Discussion started by: kirkm76
1 Replies
3. Solaris
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
#!/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. Shell Programming and Scripting
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. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. UNIX for Dummies Questions & Answers
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
tunefs(1M) System Administration Commands tunefs(1M)
NAME
tunefs - tune an existing UFS file system
SYNOPSIS
tunefs [-a maxcontig] [-d rotdelay] [-e maxbpg] [-m minfree] [-o space | time] special | filesystem
DESCRIPTION
tunefs is designed to change the dynamic parameters of a file system that affect the layout policies. When using tunefs with filesystem,
filesystem must be in /etc/vfstab. The parameters that can be changed are indicated by the options given below.
OPTIONS
The following options are supported:
-a maxcontig
The maximum number of logical blocks, belonging to one file, that is allocated contiguously. The default is calculated as follows:
maxcontig = disk drive maximum transfer size / disk block size
If the disk drive's maximum transfer size cannot be determined, the default value for maxcontig is calculated from kernel parameters as
follows:
If maxphys is less than ufs_maxmaxphys, which is 1 Mbyte, then maxcontig is set to maxphys. Otherwise, maxcontig is set to ufs_maxmax-
phys.
You can set maxcontig to any positive integer value.
The actual value will be the lesser of what has been specified and what the hardware supports.
-d rotdelay
This parameter is obsolete as of the Solaris 10 release. The value is always set to 0, regardless of the input value.
-e maxbpg
Indicates the maximum number of contiguous logical blocks any single file can allocate from a cylinder group before it is forced to
begin allocating blocks from another cylinder group. Typically this value is set to approximately one quarter of the total contiguous
logical blocks in a cylinder group. The intent is to prevent any single file from using up all the blocks in a single cylinder group,
thus degrading access times for all files subsequently allocated in that cylinder group.
The effect of this limit is to cause big files to do long seeks more frequently than if they were allowed to allocate all the blocks in
a cylinder group before seeking elsewhere. For file systems with exclusively large files, this parameter should be set higher.
-m minfree
Specifies the minimum free space threshold, or the percentage of space held back from normal users. This value can be set to 0. How-
ever, up to a factor of three in throughput will be lost over the performance obtained at a 10% threshold. Note: If the value is raised
above the current usage level, users will be unable to allocate files until enough files have been deleted to get under the higher
threshold.
-o space|time
The file system can either be instructed to try to minimize the time spent allocating blocks, or to try to minimize the space fragmen-
tation on the disk. The default is time.
Generally, you should optimize for time unless the file system is over 90% full.
USAGE
See largefile(5) for the description of the behavior of tunefs when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
mkfs_ufs(1M), newfs(1M), attributes(5), largefile(5)
SunOS 5.10 5 Dec 2003 tunefs(1M)