Sponsored Content
Full Discussion: Second try mput failed
Top Forums Shell Programming and Scripting Second try mput failed Post 302934384 by Gautham on Friday 6th of February 2015 12:36:32 PM
Old 02-06-2015
Actually I'm trying to re post the file to the remote machine if it fails due some sort of network troubles so I'm capturing a log file for this and using '226' presence in it, if not there re-post the file.

the script tried to re-post the file it threw an overwrite error ( so what it means is we do have a HALF/INCOMPLETE file in remote machine ) right, but when I manually connect to the same remote machine and do the exact same command of mput <filename> present inside the script, it worked fine

the core part of script will be
Code:
ftp -n -v -i remote_machine << EOF > log_file 2>&1
user username pswd
binary
mput file_name
bye
EOF

After the above code having a if loop to check for '226' presence in logfile, if not present then do the same above code again ( this is where I get "Overwrite" error from script but manual try worked )

does has to do something with which shell i'm running it, the machine is set to bash and script is running through ksh. Solaris 5.10 is the version of OS.

I see we do have a command reget for getting a file again from remote machine to local machine like its going to presume from where it stopped. In the same way is there any command to do the opposite of it ie. reput

:::: FTP LOGS ::::
Code:
550 myfile_catch_me.txt: Cannot overwrite existing file.
451 Requested action aborted. Permission denied.

Any help/suggestion will be appreciated !!

Last edited by Don Cragun; 02-06-2015 at 04:36 PM.. Reason: Add CODE tags. Get rid of extra spaces in ICODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mget and mput...

hello, i was interested in knowing if you can mget or mput a sequence of files: example- say i have a dir with 1000 files with the same extension e.g. *.sgi, is there a way to mget only the last 200 files? i would assume that there is a flag i would use, or something like: mget... (14 Replies)
Discussion started by: yoyomamma
14 Replies

2. Solaris

FTP limits - mput *

I am trying to upload via FTP 11,000 files in a Solaris 8 system. I am using Windows 2000 and its FTP client to upload the files. The command used is mput *.jpg.When the quantity of files reaches 10,000 the upload aborts. Is this problem related with the FTP client ? If yes, another FTP client... (2 Replies)
Discussion started by: waldecy
2 Replies

3. Shell Programming and Scripting

mput is not working in ftp script

1)In this script mput command is not working( not transfering multiple files, it is able to send single file) 2)here is the script to automate the ftp process . 3)for transfering files from one machine to other machine using ftp can anyone can give me the solution in this issue Script is... (6 Replies)
Discussion started by: gsri
6 Replies

4. Shell Programming and Scripting

SFTP - 'put' doing an 'mput'

Hi guys, I'm having a problem with F-Secure Unix. When I try a simple command; sftp> put local.test remote.test I expect that the local file local.test would be copied to the remote file remote.test However sftp is attempting to copy local.test & remote.test from the local machine, as if... (2 Replies)
Discussion started by: b0bbins
2 Replies

5. AIX

SFTP Failed---Request for subsystem 'sftp' failed on channel 0

Hi, While I am trying SFTP my machine to another unix machine , it was working fine till 10 min back. But now i am getting the below error "Request for subsystem 'sftp' failed on channel 0" Could you please someone help me to solve or analyise the root cause... Cheers:b:, Mahiban (0 Replies)
Discussion started by: mahiban
0 Replies

6. UNIX for Dummies Questions & Answers

Ok. I've have looked and failed.

What I want seems to me should be simple but so am I so.... I have a Unix server that is running a program we will say logged in as UserA. The program is outputting a bunch of stuff to the terminal. I would like to log in from my machine to the server as Either UserA, UserB or if needed... (2 Replies)
Discussion started by: Dishevel
2 Replies

7. UNIX Desktop Questions & Answers

How to grep and pipe to mput ftp

I am ptting the following into an FTOP script. date=`TZ="aaa24" date +'%Y%m%d'` # this gets Yesterday date . . . . mput < 'l | grep $Vdate' # the idea to grep a listing from a directory that has yesterday date in its file name then put it in the remote FTP server. How can I get it... (4 Replies)
Discussion started by: raouf@comcast.n
4 Replies

8. Solaris

Cygwin X Server error: xdmcp fatal error session failed session 23 failed for display

Hi, i got the following error when i tried to access the cygwin x server from a windows XP PC. "xdmcp fatal error session failed session 23 failed for display" Alternatively, when i tried to access the same Cygwin X Server from another windows XP PC which is on a different LAN... (3 Replies)
Discussion started by: HarishKumarM
3 Replies

9. Shell Programming and Scripting

mput question

I want to mput a file without extension, and while doing the mput i want to include the .txt as an extension to the file name. How can i do that? (2 Replies)
Discussion started by: wizardofoz
2 Replies

10. Shell Programming and Scripting

.netrc does not execute mput command

Hi all :D i' ve a script running on freebsd system: echo "Start FTP Transfer" cd /tmp/elaboralog ftp -i 192.168.27.147 2100 > /tmp/elaboralog/ftp_log_phase2That call .netrc machine 192.168.27.147 login user password 12345 macdef backup binary cd tmp/elaboralog mput *-file.txt... (19 Replies)
Discussion started by: mirrorx
19 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 09:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy