Sponsored Content
Top Forums UNIX for Advanced & Expert Users ftp - any best practices for signalling end of transfer? Post 302591546 by agama on Thursday 19th of January 2012 10:26:25 PM
Old 01-19-2012
Depending on the situation, I send to a filename that has a bang (!) as the last character. When the transfer is done, I rename the file to remove the bang. Same effect as creating a marker file, but less things in the directory to track. I also think it's easier to quickly see how many 'in progress' files exist. If I am really concerned about correctness, I send a 'done file' that contains the checksum of the data file and use the bang technique on both files. The receiving process then can verify that there were no errors in transmission and/or writing the file to disk.

Another technique that I use, when able, is to have the sender schedule the process on the remote host that will process the file after it believes the file has been sent successfully. No renaming or done files needed, and when I schedule the process, I can give it a checksum to verify that the file was received without error.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP Transfer Success

Hi I'm using Shell script which will ftp (download) a file from a host. I need to check whether the file has been transfered completley or not. Can anyone tell me how to do that? Thanks Ben (1 Reply)
Discussion started by: abrd600
1 Replies

2. Solaris

ftp transfer

Hi ....I'm trying to ftp 2 pkgs SUNWqlc & SUNWqlcx since they were accidentally deleted from my servers. For one reaseon or the other my server is not loading the cdrom, so I mounted the cdrom on a differernt server & ftp's to it. I tried to get this pkg using the bin & I get an error message... (3 Replies)
Discussion started by: Remi
3 Replies

3. Shell Programming and Scripting

FTP Transfer error

Hi ! I created a similar script as shown below to automate an FTP transfer and encountered errors. Appreciate any advice to resolve this issue. The script: #!/usr/bin/ksh ftp 'IP ADD' << cmd user 'user' 'pass' lcd /home/data get 'FileA' FileB quit cmd Connected to 'IP_ADD'.... (3 Replies)
Discussion started by: cosec
3 Replies

4. Shell Programming and Scripting

file transfer using Ftp

Hi All, I am very new to shell scripting,I have some doubts how we can do a file transfer using ftp I wanted to transfer files using non_secure ftp and secure ftp(sftp) mode, for secure ftp i am using following code verbose="verbose" ftp="/usr/bin/ftp" user="ABC" pass="123"... (1 Reply)
Discussion started by: sudhi
1 Replies

5. Shell Programming and Scripting

File Transfer through FTP

Hi Guys, I wanted to transfer files from FTP machine to Linux Machine. In this, I need to create a batch file that will connect to the Linux Machine and Transfer the files specified as the parameter to the files. Ex : transferfiles Product Time Geography Here transferfiles shld contain... (4 Replies)
Discussion started by: Swapna173
4 Replies

6. Shell Programming and Scripting

FTP (File Transfer)

I am going to transfer file from UNIX directory to remote windows location and i wrote the script but i am getting the error as 'FTP: not found' or i am getting this error 'The file path is not found'. Please help me to resolve this problem as early as possible.(urgent). my script is, ... (6 Replies)
Discussion started by: praka
6 Replies

7. Shell Programming and Scripting

ftp transfer in a for loop

Frdz, i have scenorio like i have to open ftp connection in a for loop and connect to the other server and upload the file again and again till the for loop ends but i am getting problem when i use the following code. for i in `ls ${SOURCE_DIR}/` do FOLDER_NAME=`basename $i` for j in `ls... (4 Replies)
Discussion started by: KiranKumarKarre
4 Replies

8. UNIX for Dummies Questions & Answers

Help with FTP Variable Transfer

Hey all, I'm trying to upload a file to my ftp server through an automated batch program. I will be uploading a file that's name changes according to you IP Address, so I am using the variable %ip% to represent the file's name. The problem occurs when it transfers over to the ftp portion of the... (2 Replies)
Discussion started by: piking
2 Replies

9. Shell Programming and Scripting

[BASH] signalling

Hi guys, I am using slurm to send file to make calculation on a server at my university. The time limit for these calculation is 5 days but sometimes it is not enough. For this reason I need a clean up function that before the calculation ends copy the unfinished calculation file ( in order to... (5 Replies)
Discussion started by: gbengasi
5 Replies

10. UNIX for Beginners Questions & Answers

How to see the status of all the ftp put & get files logs and curent ftp transfer status ?

How to see the status of all the ftp put & get files logs and curent ftp transfer status if any active ftp running in the background ? (2 Replies)
Discussion started by: i4ismail
2 Replies
locks(4)						     Kernel Interfaces Manual							  locks(4)

NAME
locks - A directory that contains lock files for communication devices and remote systems that prevent multiple attempts to use the same device or contact a remote system SYNOPSIS
/var/spool/locks DESCRIPTION
Lock files are created by the uucico daemon, the cu command, the tip command, and the uugetty command in the /var/spool/locks directory. The files are created when the utility opens the serial line for communication. The lock file locks the device or remote system so that another process cannot access it while it is in use. The file name of the lock file uses one of the following forms: LCK..device_name LCK..system_name Where device_name is the name of the device (such as ttyd0) and sys- tem_name is the name of the system (such as hera). Normally, the process that creates a lock file will remove it when the process has finished using the line. However, it is possible for lock files to be left behind (for example: system crash, phone line disconnects unexpectedly). This situation has been accounted for and the commands that use lock files can handle the situation and overwrite these files, if appropriate. Lock files contains the process ID (PID) of the process that created the lock. The lock file is a data file; to see its contents, use the following command: od -d lockfile Where lockfile is the name of the file. For example: % od -d /var/spool/locks/LCK..ttyd0 0000000 06854 00000 0000004 In this example, the lock file (LCK..ttyd0) was created by the process with PID 6854. FILES
Contains the uucico daemon and uugetty program. Contains the uucp, cu, and tip programs. RELATED INFORMATION
Commands: cu(1), od(1), tip(1), uucp(1), uugetty(8) Daemons: uucico(8) delim off locks(4)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy