Sponsored Content
Top Forums Shell Programming and Scripting Generate file and Upload to SFTP server. Post 302782915 by DGPickett on Tuesday 19th of March 2013 02:39:06 PM
Old 03-19-2013
Well, fuser works in UNIX for all users and files, but maybe elsewhere it might balk at other users or their files.

If you select or echo some odd string on the end of the file (being careful it is not sorted), then when it arrives, you are done. Some people like to send a row total or checksum, for validation. Of course, something terrible might have gone wrong in an earlier query, so egrepping for nasty or happy phrases in the log is also good. And of course, you have to remove the trailer from the tabular data at some point.

Many apps write a substitute path until things are done, like downloads going into an *.part file. For uploads, you can upload each file to temp.tmp and then move/mv/rename it when you like it, which might just be when the upload is done, or when it also has the right size. For downloads, you need the other end to signal the file is ready, and then you need to mark the file ready to process, and again, renaming is very effective. The directory inode lock is your lock.

Some sites send an ack file with the count or empty, just to say the other, main file is OK, but I prefer using the name itself. What happens if an ack file is left around (unless the name has a date component)?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stuck in perl cgi to upload a file to server

hi, i m working on a perl cgi script which uploads a file to the server. i m stuck. i hav written the errors. plz help. Sachin Kaw ______________________________________________________________________ #!/usr/bin/perl -w use CGI; use CGI qw(:standard); use strict; use POSIX... (4 Replies)
Discussion started by: sachin_kaw
4 Replies

2. Shell Programming and Scripting

upload excel file contents to server

Hi I have an excel file with only 5 rows .I want to uplaod those 5 rows to a database using a shell script.Is this possible.If so where do i start. Thnks (1 Reply)
Discussion started by: magikminox
1 Replies

3. Shell Programming and Scripting

sftp file upload problem

Hi All, I am trying to upload a text file from HP unix to Windows tectia server using sftp, the text file shows with new line character after upload. For EG : abc.txt file contains 123 456 aftre upload it shows as 123 456 i am using sftp version 2.0 TQ, (4 Replies)
Discussion started by: phani1312
4 Replies

4. Shell Programming and Scripting

upload file to webdav server

Hi all i have a such question this is my shell script my script must upload file to webdav server ////////////////////////////////////////////////////////////////////////////////////////////////////////////// #!/bin/sh ###... (1 Reply)
Discussion started by: knut
1 Replies

5. Shell Programming and Scripting

How to Write sftp through "expect" for file upload ?

Hi Experts , I am new to unix programming please tell me how to write expect and hoe to call it for automated file upload process. help me really ! (0 Replies)
Discussion started by: kulbhushan
0 Replies

6. Ubuntu

I want to upload file on remote machine in noninteractive mode through SFTP

Hi All, I want to upload file through SFTP in non interactive mode on remote server. please tell me what will have to do in oreder to do SFTP . (1 Reply)
Discussion started by: kulbhushan
1 Replies

7. Shell Programming and Scripting

Script to upload latest file to other server via FTP

Hello, I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver. Here's what I have that finds the newest file: find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies

8. Proxy Server

Upload file from desktop to UNIX server via putty

I have a requirement of following - 1. Transfer excel spreadsheet from desktop to unix server 2. Open the spreadsheet and read the sql row by row at a time 3. Run each sql on database using unix and then send output back to spreadsheet that was uploaded earlier and then transfer file back to... (12 Replies)
Discussion started by: Analabhatla
12 Replies

9. Shell Programming and Scripting

File upload message in SFTP

Hi, Below script is running on AIX 7.1 ( 7100-04-05-1720 version ) server. Recently OpenSSH version installed on server got updated from OpenSSH_6.0p1 to OpenSSH_7.5p1 version. After this update we do not receive any file upload message after put/mput command in SFTP. sftp -b - user@server... (1 Reply)
Discussion started by: Juggernaut
1 Replies
dput(1) 						      General Commands Manual							   dput(1)

NAME
dput - package upload tool for Debian SYNTAX
dput [options] [host] package.changes ... DESCRIPTION
This is a tool for uploading Debian packages into the archive. You may specify to which host it should upload the file by passing it an host argument. If omitted, dput uses the host specified by default_host (or, historically default_host_non-us) configuration option. Also you have to pass the program one or more name of package.changes files and then they will be sequentially uploaded. This program will then upload the package for you into the archive, using a selected upload method. Currently dput supports ftp, scp, rsync, http, https, and local. The method scripts have been split from the main script so it is easy to add new methods. Look in /usr/share/dput/ for examples. Should something go wrong with your upload to destinations using the Debian upload queue daemon (e.g. ftp-master), you can remove files from the upload queue with dcut(1). OPTIONS
-c, --config - define a config file to use. -d, --debug - activate debugging mode, helpful if bugs occur. -D, --dinstall - do a dry run of dinstall after the upload. -f, --force - force an upload of an already uploaded package. -h, --help - print help information and exit. -H, --host-list - print the lists of hosts that dput knows about. -l, --lintian - run lintian before the upload. -U, --no-upload-log - do not write a .upload log file after uploading. -o, --check-only - check only the package and do not upload. -p, --print - print the configuration that dput is using. -P, --passive - use passive ftp instead of active. Note that passive ftp is the default unless specified otherwise in the configuration file. -s, --simulate - simulate an upload only. -u, --unchecked - don't check GnuPG signature on the changes file. -e, --delayed - Upload to a DELAYED queue, rather than the usual Incoming. This takes an argument from 0 to 15. Note that a delay of 0 is different from no delay at all. -v, --version - print version information and exit. -V, --check-version - check if the user has already installed and tested the package before putting it into the archive. ENVIRONMENT
This program doesn't depend on any environment variables. But if the variable USER is set, it will be used. LICENSE
This program is distributed under the terms of the GPL. BUGS
Please send bug reports to the author. FILES
/etc/dput.cf global dput configuration file ~/.dput.cf peruser dput configuration file SEE ALSO
dput.cf(5) dcut(1) /usr/share/doc/dput /usr/share/dput AUTHOR
dput was written Christian Kurz. The current maintainer is Thomas Viehmann <tv@beamnet.de>. Many other people have contributed to this code. See the Thanks file. COMMENTS
The author does appreciate comments and suggestions from you. October 5, 2001 dput(1)
All times are GMT -4. The time now is 07:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy