Sponsored Content
Full Discussion: Ftping through unix script
Top Forums UNIX for Dummies Questions & Answers Ftping through unix script Post 302098031 by arunkumar_mca on Thursday 30th of November 2006 06:53:22 AM
Old 11-30-2006
Hi ...


Please try the below script ..

#!/bin/sh
cd /home/user
ftp -n 111.222.333.444 <<EOT
quote user unixuser
quote pass unixuserpass
binary
cd /TEST
put test.txt
quit
EOT



As far unix is concerned you can do ftp to a windows machines ...In the above script if you find any prob please come up with ...

Thanks,
Arun...
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

FTPing over COM port ???

Hello. Can someone please help, or give me any advice. The company I work for has a unix machine and works over the com port rather than IP. We need to retrieve some files from it onto another unix machine and we are trying to get an ftp program to work, does anyone know any ftp programs that... (1 Reply)
Discussion started by: badge
1 Replies

2. Shell Programming and Scripting

Error in ftping script

Hi all , Can u please help me in this. I tried to just login server through the below script SERVER="Server_NAME" USER="i am user" PASSWD="mypassword" ftp -in $SERVER<<EOF user $USER $PASSWD mkdir Chanakya #To create directory with my name in $HOME ls > list put list bye... (5 Replies)
Discussion started by: Chanakya.m
5 Replies

3. Shell Programming and Scripting

FTPing from unix box to windows box.

Hi All, I need to know if it is possible ftping files from unix box to windows box . if yes , how ?. Is there any pre-requisits. Please tell me the steps, this is very urgent. Thnx Aru (8 Replies)
Discussion started by: aarora_98
8 Replies

4. UNIX for Dummies Questions & Answers

FTPing from XP to Solaris

Hello. I'm new to Unix. I've got a SUN Ultra 10 running Solaris 5.7 and I'm trying to FTP to it from my XP PC. My PC has an IP address of 10.0.0.3 and a Subnet of 255.255.255.0. I'm connected to the Sun machine with a crossover cable. I type "ifconfig hme0 10.0.0.5" in a shell window (as... (3 Replies)
Discussion started by: dtferreira
3 Replies

5. UNIX for Dummies Questions & Answers

ftping a file based in the size

Hi, I want to connect to a remote machine using FTP, check for the size of a file there. If it is 0 bytes, then there is no need to ftp else i have to ftp the file. Any help will be highly appreciated. (7 Replies)
Discussion started by: vikas.rao11
7 Replies

6. Shell Programming and Scripting

removing files after ftping

Hi All, I'm trying to write script to ftp some files and then need to remove these files from server. Is there any way to keep the condition that the file should be removed only after successfully transfered to the destinatino server? If in case, the file isn't been transferd, it should not be... (5 Replies)
Discussion started by: im_new
5 Replies

7. UNIX for Dummies Questions & Answers

Script for FTPing files to mainframe GDG

Hi, Request Unix gurus to kindly share a script which FTPs multiple files from Unix to a Mainframe GDG. The script should check for oldest file named as 'abc*.txt' in a directory '/dir/child'. FTP that file to MF, then remove the file from unix and then look for the next oldest file to be... (1 Reply)
Discussion started by: dsrookie
1 Replies

8. UNIX for Dummies Questions & Answers

How to remove junk (^Ò) character while FTPing

Hi All, I have been trying to FTP some data files from Windows directory to a UNIX server. The txt file in the windows contails the following data: "111~XYZ~1~Contact person’s phone number~COMMENTS~~~~" but the same line is appearing as "111~XYZ~1~Contact person^Òs phone number~COMMENTS~~~~"... (8 Replies)
Discussion started by: vkumbhakarna
8 Replies

9. UNIX for Dummies Questions & Answers

ftping a Zip file

i want to sftp a .zip file.when i am doing get abc.zip thenabc.zip is getting copied to my home folder. but on clicking abc.zip on my home folder to open it i am getting error message as "Unable to unarchive abc.zip into <homefolder> name" How to sftp the Zip file Thanks (1 Reply)
Discussion started by: bmrout007
1 Replies

10. Shell Programming and Scripting

FTPing files from unix server to windows server

Hi, Below is the script which ftps the file from unix server and putting in a different directory(but on unix server) How can i ftp the files from unix server and to place in a secure location on windows server? what changes needs to be done to the below script? How can this be... (1 Reply)
Discussion started by: venkatesht
1 Replies
ftpd(8c)																  ftpd(8c)

Name
       ftpd - DARPA Internet File Transfer Protocol server

Syntax
       /usr/etc/ftpd [ -d ] [ -l ] [ -ttimeout ]

Description
       The  server  is	the  DARPA  Internet  File  Transfer  Protocol server process.	The server uses the TCP protocol and is invoked by when it
       receives a connection on the port specified in the service specification.  For further information, see

       The server currently supports the following requests.  Case is not distinguished.

       Request	Description

       ABOR	 Abort previous command

       ACCT	 Specify account

       ALLO	 Allocate storage

       APPE	 Append to a file

       CDUP	 Change to parent of current working directory

       CWD	 Change working directory

       DELE	 Delete a file

       HELP	 Give help information

       LIST	 Give list of files in a directory (ls -lg)

       MKD	 Make a directory

       MODE	 Specify data transfer mode

       NLST	 Give name list of files in directory (ls)

       NOOP	 Do nothing

       PASS	 Specify password

       PASV	 Prepare for server-to-server transfer

       PORT	 Specify data connection port

       PWD	 Print the current working directory

       QUIT	 Terminate session

       RETR	 Retrieve a file

       RMD	 Remove a directory

       RNFR	 Specify rename-from file name

       RNTO	 Specify rename-to file name

       STOR	 Store a file

       STOU	 Store a file with a unique name

       STRU	 Specify data transfer structure

       TYPE	 Specify data transfer type

       USER	 Specify user name

       XCUP	 Change to parent of current working directory

       XCWD	 Change working directory

       XMKD	 Make a directory

       XPWD	 Print the current working directory

       XRMD	 Remove a directory

       The remaining requests specified in Internet RFC 959 are recognized, but not implemented.

       The server interprets file names according to the globbing conventions used by This allows users to utilize the metacharacters *?[]{}~.

       The server authenticates users according to three rules:

       1.   The user name must be in the password database, and not have a null password.  In this case a password must be provided by the  client
	    before any file operations may be performed.

       2.   The user name must not appear in the file

       3.   If	the  user  name  is  anonymous	or an anonymous account must be present in the password file (user ftp).  In this case the user is
	    allowed to log in by specifying any password (by convention this is given as the client host's name).

       In the last case, takes special measures to restrict the client's access privileges.  The server performs a command to the  home  directory
       of the user. To prevent system security from being breached, it is recommended that the subtree be constructed with care.  Thus the follow-
       ing rules are recommended:

       ~ftp)	 Make the home directory owned by and unwritable by anyone.

       ~ftp/bin) Make this directory owned by the superuser and unwritable by anyone.  The program must be present to support the  list  commands.
		 This program should have mode 111.

       ~ftp/etc) Make this directory owned by the superuser and unwritable by anyone.  The files and must be present for the command to work prop-
		 erly.	These files should be mode 444.

       ~ftp/pub) Make this directory mode 777 and owned by Place the files, which are to be accessible by the anonymous account,  in  this  direc-
		 tory.

Options
       -d   Enables certain debugging messages that are printed by ftpd.

       -l   Logs each ftp session to the

       -t   Sends the inactivity timeout period to timeout; otherwise, the server will timeout an inactive session after 15 minutes.

Restrictions
       Support does not exist for aborting commands.

       The use of an anonymous account is inherently dangerous and should be avoided when possible.

       The  server  must  run  as  the superuser to create sockets with privileged port numbers.  The server maintains an effective user id of the
       logged in user, reverting to the superuser only when binding addresses to sockets.  The possible security holes have been extensively scru-
       tinized, but are possibly incomplete.

Files
       Contains the list of unauthorized users

See Also
       ftp(1c), services(5), inetd(8c), syslog(8)

																	  ftpd(8c)
All times are GMT -4. The time now is 08:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy