FTP
File Transfer Protocol, ftp is a program that allows you
to transfer your files
to or from a remote system connected by the Internet.
If you have accounts on more than one system,
you can use ftp to
transfer files back and forth between them. You must know the Internet address of
the remote system, and also the pathname of the
file on the remote system.
FTP - a brief note
The
ftp command uses the File Transfer Protocol (FTP) to transfer files
between the local host and a remote host or between two remote hosts. The FTP
protocol allows data transfer between hosts that use dissimilar file systems.
- Syntax
At the ftp>
prompt, you can enter subcommands to perform tasks such as listing remote
directories, changing the current local and remote directory, transferring multiple files in a single request,
creating and removing directories, and escaping to the local shell to perform
shell commands.
Sub-Commands
|
What they do
|
ascii
|
Every FTP client
can transfer files in two modes: ASCII and BINARY. ASCII is for text and html
files. Images should never be transferred in ASCII mode .Secure documents,
such as .htaccess and .htpasswd should be transferred in ASCII mode.
|
binary
|
The second ftp
transfer mode. It is more powerful than ASCII, because both text/html files
and images, can be transferred correctly with it.
|
open
|
The first step to
connect to a remote server with your ftp client.
|
user
|
When you connect to
an ftp server, you are automatically asked for your username and password. If
for some reason the login fails for you, you can type user. That way you'll be asked for your username and password
again.
|
dir
|
Shows the contents
of the current remote directory, with several details, such as the date of
their creation, their size and their chmod status. If you type dir yourfilename.html, it will only show this file.
If you type dir a*,it will show all the files beginning with a. If you type
a*.jpg, it will show all the .jpg files that begin with a.
|
get
|
Enables you to
download a remote file from the current remote directory, to your current
local directory.
|
mget
|
Enables you to get
multiple remote files and transfer them to your local directory.
|
put
|
Enables you to
upload a local file from your local directory to the current remote
directory.
|
mput
|
Enables you to put
multiple local files form your local directory to your current remote
directory.
|
bye
|
Terminates the
current connection.
|
cd
|
Changes the remote
directory.
|
hash
|
This is a useful command, when you want to see the transfer process. When you
turn hash on, it will say: hash mark printing on ftp:(x bytes/hash mark)It
will show up a certain number of bytes in the place of x. The hash mark is
this symbol (#).If you see that when transferring a file there are no
hashmarks and you have hash enabled, then your request might have timed out
or stopped for some weird reason. Some times, though, it's just the server
being slow.
|
lcd
|
Changes the local
directory to the directory of your choice. You must type in the full path,
for example lcd C:\website\docs.
|
mdelete
|
Enables you to
delete multiple remote files.
|
prompt
|
Or Interactive
mode. By default it is turned on and each time you want to transfer or delete
multiple files, you will be asked: mdele/mput/mget filename.html?(press enter
or y for yes, n for no).That can be annoying if you want to transfer a whole
directory or such, so you should turn it off in that case. To turn it on
again, just type prompt for another time.
|
TIP: If you want to
transfer a whole remote or local directory, just switch to it and type:
mget/mput *.* .If you want to download/upload only certain file types, for
example, only gifs, type in: mget/mput *.gif. You get the idea. That's the
reason FTP can save you from wasting time on typing in filenames. You should
disable interactive mode before trying to download/upload though (type in
"prompt"), because if you don't, the program will ask you for
confirmation before downloading/uploading each file.
- To Log in to a Remote Host
1.) Change to the directory that contains the file you
want to send (sending a file) or to the directory where you want the
transferred file to reside (receiving a file).
2.) Log in to the remote host. This can be done either
directly or indirectly. To log in to a remote host directly, enter:
ftp HostName
Enter your login name
and password when prompted by the system.
1. Connected to canopus.austin.century.com.
2. 220 canopus.austin.century.com FTP server
3. Name: dee
4. 331 Password required for dee.
5. Password:
6. 230 User dee logged in.
7. ftp>
3.) To log in to a remote host indirectly, enter:
ftp
When the ftp>
prompt is displayed, enter:
open HostName
Enter your name and
password when prompted by the system.
1. Connected to canopus.austin.century.com.
2. 220 canopus.austin.century.com FTP server
3. Name: dee
4. 331 Password required for dee.
5. Password:
6. 230 User dee logged in.
7. ftp>
You
are now ready to copy a file between two hosts.The ftp command uses the ASCII default transfer type to copy files.
1.) Determine if the file that you wish to copy is in the current directory by issuing the dir subcommand. (The dir subcommand for the ftp command functions the same as the ls -l command.) If the file is not there, use the cd subcommand to move to the proper directory.
binary
3.) To copy a file to your host, enter:
get FileName (use mget for multiple files)
The file will
be placed in the directory from which you issued the ftp command.4.) To end the session, press the Ctrl-D key sequence or enter quit.
The ftp command uses the ASCII default transfer type to copy files.
1.) If you wish to place the file in a directory other
than the $HOME directory, use the cd subcommand to move to the
desired directory.
binary
put FileName (use mput for multiple files)
The file
will be placed in the working directory of the remote host.
4.) To end the session, press the Ctrl-D key sequence or
enter quit.
FTP: (Transfer files from front end to Application
Server):
Download from SAP market place in to front end.
FTP to one of the Application server into which we want to
import support packages.
C:\temp>ftp ls0017
User name: sidadm
Password:
ftp> bin
Go to transport directory of the Application server
ftp> cd /usr/sap/trans
ftp> put KB62009.car
ftp> bye
22 Comments
Yes! Finally someone writes about healthy fragrances.
ReplyDeleteVery rapidly this web page will be famous amid all blog viewers, due
ReplyDeleteto it's good content
Very rapidly this web page will be famous amid all blog viewers, due
ReplyDeleteto it's good content
Great post.
ReplyDeleteWhat's up, I would like to subscribe for this blog to obtain most recent updates, so where
ReplyDeletecan i do it please help out.
What's up, I would like to subscribe for this blog to obtain most recent updates, so where
ReplyDeletecan i do it please help out.
I am truly thankful to the owner of this web page who has shared this wonderful piece of writing at at this place.
ReplyDeleteIf you would like to increase your knowledge simply keep visiting this site and
ReplyDeletebe updated with the most up-to-date information posted here.
If you would like to increase your knowledge simply keep visiting this site and
ReplyDeletebe updated with the most up-to-date information posted here.
Hello mates, how is the whole thing, and what you desire to say on the topic of this
ReplyDeletearticle, in my view its really awesome in support of me.
Hello mates, how is the whole thing, and what you desire to say on the topic of this
ReplyDeletearticle, in my view its really awesome in support of me.
This is my first time visit at here and i am genuinely happy to read everthing at one place.
ReplyDeleteVery good write-up. I certainly love this site.
ReplyDeleteKeep writing!
Very good write-up. I certainly love this site.
ReplyDeleteKeep writing!
I go to see day-to-day some web sites and blogs to read articles, but this website provides feature based content.
ReplyDeleteGreat items from you, man. I've remember your stuff
ReplyDeleteprevious to and you're simply extremely fantastic.
I really like what you have acquired here, certainly like what you're saying and the
way in which wherein you assert it. You're making it enjoyable and you still care for to stay it wise.
I cant wait to learn much more from you. That is actually a
terrific site.
Great items from you, man. I've remember your stuff
ReplyDeleteprevious to and you're simply extremely fantastic.
I really like what you have acquired here, certainly like what you're saying and the
way in which wherein you assert it. You're making it enjoyable and you still care for to stay it wise.
I cant wait to learn much more from you. That is actually a
terrific site.
It's difficult to find well-informed people on this subject,
ReplyDeletebut you seem like you know what you're talking about!
Thanks
It's difficult to find well-informed people on this subject,
ReplyDeletebut you seem like you know what you're talking about!
Thanks
Valuable info. Fortunate me I discovered your website accidentally, and I am stunned why
ReplyDeletethis coincidence did not came about in advance! I bookmarked it.
Valuable info. Fortunate me I discovered your website accidentally, and I am stunned why
ReplyDeletethis coincidence did not came about in advance! I bookmarked it.
What's up to all, how is the whole thing, I think every one is getting more from this web page, and your views are good designed for new users.
ReplyDelete