- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to script ftp file transfer from Linux to Linu...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2006 08:54 AM
тАО07-26-2006 08:54 AM
I'm familair with initiating an automated ftp script from an NT server platform, i.e. "ftp -i -s:path/script_name" and I know what's required in the script.
However, how would I initiate an automated ftp session from Linux?
Is there a better way to automate the transfer of files from Linux to Linux?
I'm just looking for a short-term simple solution here.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2006 09:12 AM
тАО07-26-2006 09:12 AM
Re: How to script ftp file transfer from Linux to Linux server
Use rsync.
Use scp.
Use ftp.
Read the following documents and choose your preferred method:
www.networkeval.com/downloads/PrivatePublicKeySetup.pdf
http://www-128.ibm.com/developerworks/linux/library/l-backup/?ca=dgr-lnxw41Backup
http://www.jdmz.net/ssh/
http://www.mcwalter.org/technology/shell/ftp.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2006 09:17 AM
тАО07-26-2006 09:17 AM
Re: How to script ftp file transfer from Linux to Linux server
ftp -n
user
prompt
ascii
lcd
cd
mget *
ENDFTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2006 11:50 AM
тАО07-26-2006 11:50 AM
SolutionA short tutorial is available at http://www2.papamike.ca:8082/tutorials/pub/lftp.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2006 07:03 PM
тАО07-26-2006 07:03 PM
Re: How to script ftp file transfer from Linux to Linux server
You can configure "SSH" first of all.
Then, the best way to automate this task is by writing a "SCRIPT" and schedule its execution using the "CRON" facility.
Whatever Manuel has specified, you can do the same thing while using the "scp" command, all you need to do is to go through its "man" page.
Atul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2006 02:11 AM
тАО07-27-2006 02:11 AM
Re: How to script ftp file transfer from Linux to Linux server
If it's new data every time you initiate the FTP, it doesn't much matter which method you choose.
(although rsync can use ssh as a transport, which is much more secure)
Lastly, see if you can modify your ftp script to use sftp instead...
-tjh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2006 02:47 AM
тАО07-27-2006 02:47 AM
Re: How to script ftp file transfer from Linux to Linux server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 09:25 AM
тАО08-18-2006 09:25 AM
Re: How to script ftp file transfer from Linux to Linux server
$sftp userid@hostname
u will asked for passwd
after that
use following commands ..
*********************************
(1)inorder to get a file from ur account to ur local system use "mget" as follows
mget [filename]
or
get [filename]
(2)inorder to put file from ur local system to ur account use "mput" as follows
mput [filename]
or
put [filename]
**************************************
some other cmds that r useful is
***************************************
cd //Change the directory on the remote computer
chmod //Change the permissions of files on the remote computer
chown //Change the owner of files on the remote computer
dir (or ls) // List the files in the current directory on the remote computer
help (or ?) //Get help on the use of SFTP commands
lcd //Change the directory on the local computer
lls //See a list of the files in the current directory on the local computer
lmkdir //Create a directory on the local computer
ln (or symlink)//Create a symbolic link for a file on the remote computer
lpwd //Show the current directory (present working directory) on the local computer
lumask //Change the local umask value
mkdir //Create a directory on the remote computer
pwd //Show the current directory (present working directory) on the remote computer
rename //Rename a file on the remote host
rm //Delete files from the remote computer
rmdir //Remove a directory on the remote host (the directory usually has to be empty)
version //Display the SFTP version
! //In Unix, exit to the shell prompt, where you can enter commands. Enter exit to get back to SFTP. If you follow ! with a command (e.g., !pwd), SFTP will execute the command without dropping you to the Unix prompt
bye
vnykr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 02:45 AM
тАО08-22-2006 02:45 AM
Re: How to script ftp file transfer from Linux to Linux server
If speed is an issue, I would use rsync.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2006 11:37 AM
тАО08-22-2006 11:37 AM
Re: How to script ftp file transfer from Linux to Linux server
http://www.hpuxconsulting.com/5004.ppt
Developed but never delivered to HP World 2005.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-06-2006 04:07 AM
тАО09-06-2006 04:07 AM
Re: How to script ftp file transfer from Linux to Linux server
set /P my_folder="Please enter folder to zip and FTP: "
if exist %my_folder% goto do_zfile
goto error
:do_zfile
cd %my_folder%
rem .: if your date has '/' in the date, they need to be stripped out.
for /f "delims='/'" %%i in ('%date%') do
set my_date=%%i-%%j-%%k
winzip32 -min -a -p -ex -hs *.* %my_date%.zip
set /P my_loc="Please enter FTP site: "
set /P my_id="Please enter your ID: "
set /P my_pass="Please enter your Password: "
echo open %my_loc% > ftp_conn.txt
echo user %my_id% %my_pass%>> ftp_conn.txt
echo binary >> ftp_conn.txt
echo hash >> ftp_conn.txt
echo put %my_date%.zip >> ftp_conn.txt
echo close >> ftp_conn.txt
echo quit >> ftp_conn.txt
ftp -s:ftp_conn.txt
del ftp_conn.txt
del %my_date%.zip
goto done
:error
echo Folder was not found.
:done
- This is my batch file for ftp program. I want uses that file with SmartFTP. And when I launch that file it asking me for a file├в ┬ж I├в m typing C:\test\ - and it├в s says that, the syntax of the command is incorrect. Why??? What is the correct command???