LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 07: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, 08:49 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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, 11:11 AM   #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, 12:24 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
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 12:26 PM.
 
Old 08-07-2013, 12:28 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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, 04: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:01 AM.

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
Open Source Consulting | Domain Registration