Tag Archives: FTP

Useful FTP commands for IBMi

Open connection to i

ftp ibminame

Change file system format from “system mode” (i.e. /Qsys.Lib/Myfile.file/MyMember.mbr ) to “IFS mode” (i.e. /var/www ) to change directories (cd) on the IFS

site NAMEFMT 1

Turn off interactive mode (so you don’t have to say yes to ever FTP upload)

prompt

change to binary mode when uploading files that aren’t text

bin

upload multiple files based on file type.

mput *.{filetype}

Faster Alternatives to FTP for uploading files from Linux or Windows

FTP is great, but when your looking to send files quickly over the network you may want to look at the commands: scp, rcp, and pscp.  The use case scenario my friend Chuk brought up is the initial load of a project with many dependencies that were quickly retrieved from the internet but pushing to the hosting server is slower.  On a Mac or Linux box you just need to get to the terminal to use the command and on Windows you just need to use Putty.  The links below will show you how to use them:

Linux

SCP – Secure Copy

http://www.hypexr.org/linux_scp_help.php

RCP – Remote file copy

http://linux.about.com/od/commands/l/blcmdl1_rcp.htm

“-C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. “

Windows to Linux

Download Putty

pscp – PuTTY Secure Copy

https://community.freescale.com/thread/220596

Other reasons for your file transfer being slow could be a slow connection to the server which if you can upgrade your connection, routers and internet connect to gigabit or better you’ll remove some of these issues