I have made a script which transfers some files of the entire week , but the script fails when the next month is started.
For e.g; if i run the script on 5th may , but i need to transfer files of its previous week which is from 24th April to 30th april ,the script fails, i have this loop in the script
I just put values in $dt which gives me the date to which i need to transfer the files.
For e.g; Considering current date as 2011-05-05, i need to go to date 30th april onwards to 24th april then
24 * 5 = 120
will give me date 2011-04-30.
But the problem here is i am not getting the correct count value,
since i have used cnt1=`expr $1 - $2` which is subtracting two date values , but this does not work for the e.g; which i mentioned above
Could you suggest me a solution on this.
Would appreciate your assistance.
Are you trying to generate filenames which contain a date?
Assuming that this is a process which is going to run week-on-week fiirst impressions are that this may be easier if you have a daily cron at say 23:58 which finds and appends that days filenames in a filelist file. At say 23:59 on the last day of the week have another cron which renames filelist as filelist.lastweek and nulls filelist ready for the new week. Then the following Thursday you have a filelist.lastweek ready to use.
We are receiving data feed files in SFTP location daily. so the folder structure in SFTP location is abc/def/studyname_1/outbound/zipped files
So we will be getting different studies and for each study a folder is created abc/def/studyname_2/outbound/zipped files , ... (7 Replies)
Hi All,
Please suggest me how to make script for file transfer from server X to another server Y.
I have some directory path in server X as below:
/home/directory_1/
.
.
/home/directory_n/
where some text files are available in each directory where some files records zero and some files... (6 Replies)
I am testing the following command to transfer a file from my server (AIX 5.2) to another server. I was able to generate the keys and sent them the public key.
scp -v -P 4030 /home/lawson/.ssh/jimtest.txt someuser@some.ftpsite.net:/Inbound/jimtest.txt > jimtest_out.txt 2>&1
Based on... (3 Replies)
Hi,
I need a shell script to transfer a file from one server(unix box) to another server(windows box).
I have the details of the source and destination Ip's.
source path : /home/UNIX/server
filename:abc.txt
Destination folder: D:/UNIX/test
I am using AIX server.
Type of shell :... (1 Reply)
I use expect to spawn an sftp file transfer. On occasion the transfer fails or doesn't complete correctly, resulting in:
"sftp> cd /returns
sftp> rename /returns/TESTFILE.TXT /returns/archive/TESTFILE.TXT
Couldn't rename file "/returns/TESTFILE.TXT" to "/returns/archive/TESTFILE.TXT":
Failure... (0 Replies)
Hi Newbie here
I am having problems with automating sFTP transfers.
Just to save time - SCP is not an option as sFTP is stipulated by controllers of far end server.
Ineed to automate sFTP transfer of a single file, once a day to a remote server to which i have no control over.
I am using:... (6 Replies)
Hi ,
I want to transfer one file having 6GB(after compression) which is in .cpk format from one server to other server.
I tried scp command as well as FTP and also split the file then transfer the files thru scp command. At last i am facing the data lost and connection lost issue.
Generally it... (2 Replies)
Hai Friends
I am writing a c program to transfer files from one system to another using TCP/IP socket programming..
My Recieve Program
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
extern int errno;
extern char *sys_erlist;
void... (2 Replies)
Hi folks,
I have a big problem.... and need help from your experience/knowledge.
I previously install and use FREEBSD 7.0 release on my storage/backup
file server, for some reason, I can not transfer any files that is bigger
than 1GB. If I transfer it to Freebsd file server, the system... (2 Replies)
Hello Everyone,
I can't transfer a large file (~15GB TAR Archive) from one linux machine to another via FTP.
I have tried the following:
1) Normal FTP the whole 15GB. This stops when it gets to about 2GB and doesn't go any further.
2) Split the 15GB file into 500MB pieces using the... (1 Reply)