Knowing whether the file has completely SFTP ed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Knowing whether the file has completely SFTP ed
# 1  
Old 10-23-2009
Knowing whether the file has completely SFTP ed

Hi..

Can Anyone out there help me? I need to write a script to convert a file in EDCIDC format to CSV
The files will be transfered through sftp to the box. Is there a way to check the file has finished being transfered or still transfering. so that my conversion task will be performed after the file has finished transfered to the box.Thanks in advance
# 2  
Old 10-23-2009
Maybe use scp instead and check $?.
There is also a similar thread here, just some threads below in the list Smilie
https://www.unix.com/shell-programmin...ssful-not.html
# 3  
Old 10-23-2009
Hi Zaxxon Thanks for the reply.

Could you please let me know what is SCP?
Also can any one please let me know how to do file checking with fuser to confirm the file is not being written to anymore by the inbound sftp process. When that is not in use then load everything up i.e my conversion process
# 4  
Old 10-23-2009
fuser will most probably not help you to show if a file is still being written to. Maybe try lsof. scp is a tool that comes with the installation of ssh as does sftp. It simply means Secure Copy. Check man scp. It is easier and more comfortable to use than s(ftp).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Curl to download file from subdivx.com after following location without knowing the file name/extens

This question could be specific to the site subdivx.com In the past, I've been able to download a file following location using cURL but there is something about subdivx.com that's different and can't figure out how to get it to work. I tried the following directly in the terminal with no... (5 Replies)
Discussion started by: MoonD
5 Replies

2. UNIX for Dummies Questions & Answers

Knowing when a different program modifies a file

so i was testing something on a test box running linux. i manually vi'ed the /var/log/messages file. and i noticed, the file immediately stopped being updated. it wasn't until i restarted the syslog process that events started being recorded in it again. so that tells me, the syslog process... (20 Replies)
Discussion started by: SkySmart
20 Replies

3. UNIX for Dummies Questions & Answers

How can I use my code to gather information from a file in a completely different directory?

I need my code to compare two different files that are in two completely different directories, How can I do this? So for example, my code will look at file1 which is in my home directory, and compare the files with those from file2 that is in /abc/adf/adr/afc/adf/file2... does that make sense? (1 Reply)
Discussion started by: castrojc
1 Replies

4. Shell Programming and Scripting

how to use the filehandle stored in a variable without knowing its file association

how to use the filehandle stored in a variable without knowing its file association i.e. the filename code my $logFH = $connObj->get('logFH'); infoPrint("Variable is of type IO \n") if(UNIVERSAL::isa($logFH, 'IO')); infoPrint("$logFH\n"); output == INFO :: Variable is of type... (0 Replies)
Discussion started by: rrd1986
0 Replies

5. Shell Programming and Scripting

To check wheather a file is downloaded completely or not

I will have two files (which were in .txt format) ftp'ed to a specified directory, from where my ksh picks up each file at a time and starts processing it. So i need to write a script which as soon as find a file should check wheather it is download completely or not. If it is still downloading... (2 Replies)
Discussion started by: vpv0002
2 Replies

6. Shell Programming and Scripting

Check if file is loaded completely and then process the file

I need to write a script which checks for files loaded into a folder (files are loaded by ftp from other server) and process the file only if the file is loaded completely. if the file is not complete in the current run, it must be processed in the next run. Any suggestions would be welcome... (2 Replies)
Discussion started by: kalyan381
2 Replies

7. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

8. UNIX for Dummies Questions & Answers

Rename file knowing the first 7 carachters

Hi, people. I need some help with this: i have this file " PROVEDP_???_yyyymmdd " , and i want to rename to this " IN_PROV_yyyy???.dat " . The " ??? " is the Month , but the file could be created on April, but the name coulb be March, for example.So i need to grab the 3 caracters ... (2 Replies)
Discussion started by: osramos
2 Replies

9. UNIX for Advanced & Expert Users

knowing progress while reading a file

Hi, I am parsing a very big file say 10 MB. It 'll take more than an hour ..I want to know the progress say in % .Is there any way to do that??? or (Is there any way to know which line of the file I am in ) (2 Replies)
Discussion started by: sakthi.abdullah
2 Replies

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