Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-25-2008, 06:10 AM   #1
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
Help with FTP??

I want to know how ftp works.
I have to fetch few files through ftp from the remote machine.
I am able to connect to remote system through ftp.But donno How gonna I enter into his directory and fetch the file.
Is there any particular location i should place the files.Whenever I ftp to the remote machine on successful login its throwing me into pub directory.
On remote system where is this pub directory located??

Pls Help?

Last edited by your_shadow03; 06-25-2008 at 06:20 AM.
Old 06-25-2008, 06:30 AM   #2
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 552

Rep: Reputation: 41
the pub directory is in

to get files download gFTP and use that. it is a GUI app that makes FTP very easy.
Old 06-25-2008, 06:35 AM   #3
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062
It's probably a good idea (just because it's a little easier) to be in the directory on your machine that you want to copy files from a remote machine into (although you can change local directory in ftp, it's just easier to be in the directory before you start).

To connect to a remote machine, you just do
ftp -i remote
where remote is either a URL; e.g., or, or a address; e.g.,

You use the -i so you can get (or put) multiple files easily.

Now, the above only connects you to the machine and you need to cd (change directory) to the directory where the files are on the remote and you have to have permission to do so (granted by the administrator of the remote); if the files you want are in the /tmp directory, you should be able to cd /tmp. You most likely will not be able to cd /home/user, though, so have the remote copy the files to someplace you can get to (frequently that would be /pub/some_directory -- you need to know where that is).

So, assuming you can get into the directory, you can see the content of the directory with
Then you would get the files you want with
get file01 file02 ...
Or, if the files have similar names (that you would list with ls *name* or something similar, you can
mget *name*
(that's why the -i -- mget is multiple-get; you could do mget * to get every file in the directory).

So, to cut to the chase,
ftp -i remote
cd directory
mget pattern
get file1 file2 ...
Home this helps.
Old 06-25-2008, 07:17 AM   #4
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466

Original Poster
Blog Entries: 6

Rep: Reputation: 51
Thanks Tronyne...Great Stuffs.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
when I use it works. But when I type just says.. hunterhunter Linux - General 15 03-05-2014 09:12 AM
In plesk , I wish to have a backup cron job, ftp back up file to another ftp server? muskiediver Linux - General 6 07-16-2009 03:13 AM
files not visible in ftp site (but present in the /var/ftp/folder of the server) dongrila Linux - Newbie 2 12-23-2007 10:09 PM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 02:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration