Sponsored Content
Operating Systems Linux Red Hat Difference in file sizes being copied by scp. HELP! Post 302653101 by NotALinuxGirl on Friday 8th of June 2012 11:58:02 AM
Old 06-08-2012
I just ran a test, I used cron to SCP a file twice - with and without the -C switch. Both runs were ok, and the file sizes are equal. However, this test file was much smaller than the real one. The real one was 15GB, while the test file was only 30MB.

So, could it be that the size of a file is causing a problem?

I might be able to run the large file only over the weekend, other wise it is getting in a way of our backup process.

---------- Post updated at 11:58 AM ---------- Previous update was at 11:54 AM ----------

Quote:
Originally Posted by methyl
(Only asked about root in case there was a different ulimit).

Have you tried putting a say sleep 30 between the scp and the ssh ? I'm serious (the second command deletes the source file and the slave process could still be running).

I agree that the compression is pointless on a compressed file. Also that rsync is preferred if both computers support the command.

------------
I will put sleep in the code. It will run tonight, and result I will see Monday morning. It could be a very good catch, deletes before the previous process finishes.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find File copied completely or else ...

In Unix, I am having one file getting copied to some directory. Which command will help me ensure, that file is not completely copied to the disk? (2 Replies)
Discussion started by: videsh77
2 Replies

2. Shell Programming and Scripting

How to check file is being copied

I wanna check whether a file is being copied ,i.e the file size is increasing. Thanks for your help (2 Replies)
Discussion started by: anhkeen
2 Replies

3. UNIX for Dummies Questions & Answers

Can A File Be Copied to an RS232 Port on Unix?

We have a text/csv file (4mb) sitting on a Unix box. The PC belongs to a retail store and they're asking me to bring the file over to Windows so they can import the file. Can a file be copied to an rs232 port? If so how? The idea is that I'll hook up a null modem cable to the Unix com port,... (2 Replies)
Discussion started by: alivebyscience
2 Replies

4. Solaris

Check copied file

Hi all, If i wanted to copy file within different folders or different servers, how do i determine the copied file is absolutely correct :confused: Is it using cmp and chksum command enough? Anyway that i can make further checking? Thanks in advance for reading & anyone who reply the... (7 Replies)
Discussion started by: beginningDBA
7 Replies

5. UNIX for Dummies Questions & Answers

Using sudo scp -r – can't get everything copied though

I want to copy a folder and all its contents of ~700GB from a computer to another. I've tried sudo scp -r directory/ admin@host:directory but the result is that the copied folder is about 2GBs smaller than the original. I checked the shell for errors and found some "file doesn't exist" errors.... (2 Replies)
Discussion started by: MJH
2 Replies

6. Shell Programming and Scripting

Extract a number from a line in a file and sed in another copied file

Dear all, I am trying to extract a number from a line in one file (task 1), duplicate another file (task 2) and replace all instances of the strings 300, in duplicated with the extracted number (task 3). Here is what I have tried so far: for ((k=1;k<4;k++)); do temp=`sed -n "${k}p"... (2 Replies)
Discussion started by: mnaqvi
2 Replies

7. Shell Programming and Scripting

no of files copied by scp command

hi, I have a script which copy files by using scp command. when i run that script, i can see the process meter but I want to know how many files have been copied. suppose, by using scp 10 files is being copied and I can see process meter for all 10 files. but i also want to see ... that 10... (0 Replies)
Discussion started by: anshu ranjan
0 Replies

8. Linux

Difference in binary file sizes after deploying package via yum/rpm

Hi Guys, I have an issue whereby I package up an rpm and when I deploy it, the binary filesizes differ from what I packaged up from the SOURCE directory. from source - -rwxrwxr-x 1 user group 685156 Sep 26 15:50 cybAgent.bin after install - -rwxr-xr-x 1 user group 683388 Oct 16 11:10... (4 Replies)
Discussion started by: gazza-o
4 Replies

9. Shell Programming and Scripting

Wait for file to get copied in server path and then proceed

Hi, I have a requirement to create below script: Script must run infinitely in background. It will check a particular type of file to be copied in specific folder of server Script must wait till any file gets fully copied ..(important) and then It will read that file Experts please... (4 Replies)
Discussion started by: Vikash163
4 Replies

10. UNIX for Dummies Questions & Answers

Cp via NFS vs. scp yields unexpected difference

I have two Linux machines, Linux1 and Linux2. They both have two NFS mounts. We'll call them /scratch1 and /scratch2. And they both reside on the same NetApp filer. If I copy a 512Mb file from /scratch1 to /scratch2 while logged on Linux1 it takes 40s. However if I scp this file from... (1 Reply)
Discussion started by: crimso
1 Replies
STRFTIME(3)						   BSD Library Functions Manual 					       STRFTIME(3)

NAME
strftime, strftime_z -- format date and time LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <time.h> size_t strftime(char * restrict buf, size_t maxsize, const char * restrict format, const struct tm * restrict timeptr); size_t strftime_z(const timezone_t tz, char * restrict buf, size_t maxsize, const char * restrict format, const struct tm * restrict timeptr); DESCRIPTION
The strftime() function formats the information from timeptr into the buffer buf according to the string pointed to by format. The format string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are copied directly into the buffer. A conversion specification consists of a percent sign '%' and one other character. No more than maxsize characters will be placed into the array. If the total number of resulting characters, including the terminating null character, is not more than maxsize, strftime() returns the number of characters in the array, not counting the terminating null. Otherwise, zero is returned and the contents of the array are undefined. Each conversion specification is replaced by the characters as follows which are then copied into the buffer. %A is replaced by the locale's full weekday name. %a is replaced by the locale's abbreviated weekday name. %B is replaced by the locale's full month name. %b or %h is replaced by the locale's abbreviated month name. %C is replaced by the century (a year divided by 100 and truncated to an integer) as a decimal number [00,99]. %c is replaced by the locale's appropriate date and time representation. %D is replaced by the date in the format ``%m/%d/%y''. %d is replaced by the day of the month as a decimal number [01,31]. %e is replaced by the day of month as a decimal number [1,31]; single digits are preceded by a blank. %F is replaced by the date in the format ``%Y-%m-%d'' (the ISO 8601 date format). %G is replaced by the ISO 8601 year with century as a decimal number. %g is replaced by the ISO 8601 year without century as a decimal number (00-99). This is the year that includes the greater part of the week. (Monday as the first day of a week). See also the '%V' conversion specification. %H is replaced by the hour (24-hour clock) as a decimal number [00,23]. %I is replaced by the hour (12-hour clock) as a decimal number [01,12]. %j is replaced by the day of the year as a decimal number [001,366]. %k is replaced by the hour (24-hour clock) as a decimal number [0,23]; single digits are preceded by a blank. %l is replaced by the hour (12-hour clock) as a decimal number [1,12]; single digits are preceded by a blank. %M is replaced by the minute as a decimal number [00,59]. %m is replaced by the month as a decimal number [01,12]. %n is replaced by a newline. %p is replaced by the locale's equivalent of either ``AM'' or ``PM''. %R is replaced by the time in the format ``%H:%M''. %r is replaced by the locale's representation of 12-hour clock time using AM/PM notation. %S is replaced by the second as a decimal number [00,61]. The range of seconds is (00-61) instead of (00-59) to allow for the periodic occurrence of leap seconds and double leap seconds. %s is replaced by the number of seconds since the Epoch, UTC (see mktime(3)). %T is replaced by the time in the format ``%H:%M:%S''. %t is replaced by a tab. %U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. %u is replaced by the weekday (Monday as the first day of the week) as a decimal number [1,7]. %V is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [01,53]. According to ISO 8601 the week containing January 1 is week 1 if it has four or more days in the new year, otherwise it is week 53 of the previous year, and the next week is week 1. The year is given by the '%G' conversion specification. %v is replaced by the date in the format ``%e-%b-%Y''. %W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. %w is replaced by the weekday (Sunday as the first day of the week) as a decimal number [0,6]. %X is replaced by the locale's appropriate time representation. %x is replaced by the locale's appropriate date representation. %Y is replaced by the year with century as a decimal number. %y is replaced by the year without century as a decimal number [00,99]. %Z is replaced by the time zone name. %z is replaced by the offset from ITC in the ISO 8601 format ``[-]hhmm''. %% is replaced by '%'. The strftime_z() function is similar to strftime(), but it also takes a const timezone_t tz argument. SEE ALSO
date(1), printf(1), ctime(3), printf(3), strptime(3), tm(3) STANDARDS
The strftime() function conforms to ISO/IEC 9899:1999 (``ISO C99''). The '%C', '%D', '%e', '%g', '%G', '%h', '%k', '%l', '%n', '%r', '%R', '%s', '%t', '%T', '%u', '%V', and '%v' conversion specifications are extensions. Use of the ISO 8601 conversions may produce non-intuitive results. Week 01 of a year is per definition the first week which has the Thursday in this year, which is equivalent to the week which contains the fourth day of January. In other words, the first week of a new year is the week which has the majority of its days in the new year. Week 01 might also contain days from the previous year and the week before week 01 of a year is the last week (52 or 53) of the previous year even if it contains days from the new year. A week starts with Monday (day 1) and ends with Sunday (day 7). For example, the first week of the year 1997 lasts from 1996-12-30 to 1997-01-05. BUGS
There is no conversion specification for the phase of the moon. A return value of zero does not necessarily indicate an error. If the resulting string is an empty string, the result value is zero and it is not possible to distinguish between success and error. For example, in many locales %p yields an empty string. This problem can be avoided by inserting an extra space at the beginning of the format string and then skipping over it or removing it from the result. BSD
April 14, 2011 BSD
All times are GMT -4. The time now is 11:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy