LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-25-2008, 07:10 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
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 07:20 AM.
 
Old 06-25-2008, 07:30 AM   #2
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 544

Rep: Reputation: 40
the pub directory is in
/var/ftp/pub

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

Rep: Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039Reputation: 1039
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
Code:
ftp -i remote
where remote is either a URL; e.g., ftp.remote.com or remote.com, or a address; e.g., 192.168.1.10.

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
Code:
ls
Then you would get the files you want with
Code:
get file01 file02 ...
Or, if the files have similar names (that you would list with ls *name* or something similar, you can
Code:
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,
Code:
ftp -i remote
cd directory
ls
mget pattern
or
get file1 file2 ...
^D
Home this helps.
 
Old 06-25-2008, 08:17 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

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


Reply


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 ftp://user@ftp.blah.com it works. But when I type just ftp.blah.com says.. hunterhunter Linux - General 15 03-05-2014 10: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 04: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 11:09 PM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 03:07 PM


All times are GMT -5. The time now is 03:46 PM.

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