The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
conditional email ricky007 Shell Programming and Scripting 3 03-06-2008 01:38 AM
AWK - conditional cause Rafael.Buria Shell Programming and Scripting 2 01-28-2008 01:24 PM
conditional statement lalelle Shell Programming and Scripting 8 08-21-2007 08:57 AM
conditional split braindrain Shell Programming and Scripting 5 03-11-2006 03:54 AM
Conditional Statements cstovall Shell Programming and Scripting 1 05-15-2005 05:58 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-03-2007
Dastard Dastard is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 47
Arrow Conditional FTP

Hi Have a Nice Day
i m stuck with this quite easy task
assume that i m in certain directory and i open a ftp connection from there to some other directory and in second directory there are like so many files from july 02 till today
what would be the simple unix command to ftp all files from this directory of specific date ( like which were created on that specific date )


Regards
  #2 (permalink)  
Old 08-03-2007
jgt jgt is offline
Registered User
  
 

Join Date: Apr 2007
Location: 44.21.48N 80.50.15W
Posts: 439
Create an ftp script that logs on to the remote system and runs 'ls -l'
save the output into a file, edit the file and create a new script to retrieve the files that you need
ftp remote.host <<EOF >file.list
userid
password
ls -l
quit
EOF
then either modify file.list manually, or write a script to extract what you need from it.
  #3 (permalink)  
Old 06-21-2008
itsviju itsviju is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 4
FTP download file by date

This can help only if your files have a date stamp in their name

#!/bin/bash -vx
now_date=`date +%d%m20%y` --for date in for ddmmyyyy
ftp -in 192.168.77.7<<END_SCRIPT
quote USER abc
quote PASS XXXX
bin
prompt off
cd /folder_1_on_ftp
lcd /folder_2_on_local --folder on local drive
mget *${now_date}*
bye
END_SCRIPT
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0