LinuxQuestions.org
Review your favorite Linux distribution.
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 08-07-2013, 08:11 AM   #1
Grem41
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Rep: Reputation: 0
FTP Querying


I not sure whether this is even possible, but here is my objective.

1.FTP to a server anonymously.
2.Navigate folders and sub-folders using wildcards
(2 levels in most cases)
3.Query those folders on size,date and type
4.Reject those under a particular size,before a given date and not .pdf
5.Download all those that do meet the criteria.

I very much a newbie and have only used a GUI in the past but I guess Command Line is way to go.

Thanks in advance
 
Old 08-07-2013, 09:49 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by Grem41 View Post
I not sure whether this is even possible, but here is my objective.
1.FTP to a server anonymously.
2.Navigate folders and sub-folders using wildcards
(2 levels in most cases)
3.Query those folders on size,date and type
4.Reject those under a particular size,before a given date and not .pdf
5.Download all those that do meet the criteria.

I very much a newbie and have only used a GUI in the past but I guess Command Line is way to go.
Very possible. You can easily use expect and bash to do this, or use perl, python, or ruby. You can even write C code to do what you'd like.

So...post what you've written/done, and tell us where you're stuck, and we can help you.
 
Old 08-07-2013, 12:11 PM   #3
Grem41
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Using the command Line

Thanks for the reply TB0ne.

From what you say if I run from the terminal with a single command I should O.K. I believe the LXTerminal 0.1.11 enables me to do so since it has command line structure like bash. If you could tell me what I need to type, I'd be grateful. Sorry I'm very much a Newbie - I use Peppermint 3 if that helps.

Thanks again.
 
Old 08-07-2013, 01:24 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,916

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by Grem41 View Post
Thanks for the reply TB0ne.
From what you say if I run from the terminal with a single command I should O.K. I believe the LXTerminal 0.1.11 enables me to do so since it has command line structure like bash
No, LXterminal is only a terminal emulator, that's all. It's using bash from your Linux system to give you that prompt.
Quote:
If you could tell me what I need to type, I'd be grateful. Sorry I'm very much a Newbie - I use Peppermint 3 if that helps.
No, I'm not going to write your scripts for you, and I doubt anyone else will either. You can find a link to bash scripting tutorials in my posting signature, and many examples of expect on Google, as far as automating FTP queries. You were given hints in your other thread about looking for files on an FTP site:
http://www.linuxquestions.org/questi...pe-4175454870/

..four months ago. Have you made no progress since then?

And again, you do not HAVE to write this in bash. The other languages mentioned are also good choices. How you do it is up to you.

Last edited by TB0ne; 08-07-2013 at 01:26 PM.
 
Old 08-07-2013, 01:28 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,026

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
hi, are you only able to use ftp for some reason (which is antiquated, insecure and not very flexible).

i think it would be ideal to use ssh/scp/sshfs ... for this assignment.
 
Old 08-08-2013, 05:51 AM   #6
Grem41
LQ Newbie
 
Registered: Mar 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Not Scipt

Sorry TBone for any offence caused by implying you or someone WRITE a script.

I have used the command line and I'm very much a Linux newbie. My incorrect assumption was an ftp instructions was the solution.
It would appear not as a better idea would using ssh/scp/sshfs as suggested by schneidz - Thanks.
 
  


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
Querying sendmail cmnorton Linux - Server 1 12-11-2010 12:43 PM
rpm querying Markup SUSE / openSUSE 2 09-29-2007 02:14 AM
querying modules node047 General 0 04-06-2005 01:14 PM
querying the modules node047 Linux - General 1 04-05-2005 02:35 AM
Querying motherboard liguorir Linux - Software 1 09-02-2003 11:22 AM


All times are GMT -5. The time now is 06: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