Sponsored Content
Top Forums Shell Programming and Scripting How to FTP the latest file, based on date, from a remote server through a shell script? Post 302502265 by kamalkishore on Monday 7th of March 2011 12:08:11 PM
Old 03-07-2011
When a ftp is done, it may not be possible to list the files based on time (creation).

In my opinion best bet is if you can create the file name by appending the date and then ftp(pull) the file(as you say the files come each day).
This User Gave Thanks to kamalkishore For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP - Get the file date and time on the remote server

I would like to know if there is a way to get the date and timestamp of the file that is being FTP from the remote server using shell script. Currently the get command from FTP will have current date and timestamp. Tried the earlier suggestion 'HardFeed' but still getting the current date and time... (12 Replies)
Discussion started by: gthokala
12 Replies

2. Shell Programming and Scripting

Shell script to ftp latest file

Hello All, Hope u r doing fine. I'm writing a shell script to ftp the latest file having pericular convention as 'ULTI_15072007043205.txt' on daily basis. Now the date & timing of the file geleration isnt constant, so the file name daily varies as per the date & timing of generation. Can anyone... (7 Replies)
Discussion started by: im_new
7 Replies

3. Shell Programming and Scripting

grep latest file based on date.

hi all, not sure if this has been posted b4 but i try to search but not valid. this is my question: when i do a ls -ltr there will be a list generated as follows: -rw-r--r-- 1 root sys 923260 Jan 10 04:38 FilePolling.41025.083TL021.xml -rw-r--r-- 1 root sys 1761337 Jan 10 04:40... (12 Replies)
Discussion started by: lweegp
12 Replies

4. Shell Programming and Scripting

copy the latest file in the remote server's directory

Hi Expert Team, I performed the below piece of code to copy the latest file in the remote server's directory to the same server's other directory. But it is not working properly. How can i handle this? Can you please help me..? ssh ${REMOTE_USERID}@${REMOTE_HOSTNAME} "cp -p `ssh... (3 Replies)
Discussion started by: spkandy
3 Replies

5. Shell Programming and Scripting

Script to upload latest file to other server via FTP

Hello, I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver. Here's what I have that finds the newest file: find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Discussion started by: nbsparks
7 Replies

6. Shell Programming and Scripting

FTP using script not working (for transfering file from a remote unix server to windows PC.)

hi, Im using the following code for FTP #!/usr/bin/ksh ftp -v -n "10.29.45.11" << cmd user "mahesva" "mahesva123" get rtl.tar quit cmd Below is the log when i run the above code ********************************** Connected to 10.29.45.11. 220 (vsFTPd 2.0.1) 530 Please login with USER... (20 Replies)
Discussion started by: dll_fpga
20 Replies

7. Shell Programming and Scripting

Needed shell script to get the latest file based on date

hi i need the shell script to get the file with latest date. for example in my input folder i have files like file_20130212.txt file_20130211.txt now my output folder should have the file with latest date i.e..file_20120212.txt i want to get the latest file .. i.e is should take... (6 Replies)
Discussion started by: hemanthsaikumar
6 Replies

8. Shell Programming and Scripting

Find the latest file based on the date in the filename

Hi, We've a list of files that gets created on a weekly basis and it has got a date and time embedded to it. Below are the examples. I want to find out how to get the latest files get the date and time stamp out of it. Files are PQR123.PLL.M989898.201308012254.gpg... (1 Reply)
Discussion started by: rudoraj
1 Replies

9. Shell Programming and Scripting

Download latest file via ftp server unix through shell script

Hello this is my first post in this forum , I dont want to be unhappy.. I am writing one script but facing difficulty to find the latest file with some new pattern My requirement is 1. The file is coming like "ABCD-23220140303" at FTP server once in a week. 2. script will run on daily... (3 Replies)
Discussion started by: ajju
3 Replies

10. Ubuntu

FTP script to get latest file from server

Hello people, I have to download, with a scheduled script, the latest file from an FTP server. In the remote DIR, named .../TEKNONET/60468/, every night a CDR file like this gets uploaded into it: 000006046820151122N001.CDR, so my script will have to download every day the previous day... (12 Replies)
Discussion started by: virtus96
12 Replies
GFTP(1) 						      General Commands Manual							   GFTP(1)

NAME
gftp - file transfer client for *NIX based machines. SYNOPSIS
gftp [options] [[proto://][ user : [pass] @] server [: port ][/ directory ]] DESCRIPTION
gFTP is a file transfer client for *NIX based machines. It currently has a text interface and a GTK+ 1.2/2.x graphical interface. It cur- rently supports the FTP, FTPS (control connection only), HTTP, HTTPS, SSH and FSP protocols. OPTIONS
You may enter a url on the command line that gFTP will automatically connect to when it starts up. --help, -h Display program usage. --info Display some information about how gFTP was built. Please send the output of this command when submitting a bug report. --version, -v Display the current version of gFTP. proto This specifies the protocol that should be used. It can currently be one of the following options: ftp, ftps, http, https, ssh, fsp, local and bookmark. If omitted, the protocol specified by the default_protocol option will be used. user The username that will be used to log into the remote server. If omitted, your current username will be used for most protocols. For the FTP protocol, the anonymous username will be used. pass The password that will be used to log into the remote server. If omitted, you will be prompted for the password. If you are using the FTP protocol, and the username is anonymous, then your email address will be used as the password. server The remote server to connect to. port The remote port on the server to connect to. If omitted, the default port for the protocol will be used. The port will be looked up in the services(5) file. directory The directory to change to once you are connected to the remote server. FILES
~/.gftp/gftprc Per user configuration file. Most of these options can be edited inside gFTP. This file is also commented very well. ~/.gftp/book- marks Per user bookmarks file. BUGS
If you find any bugs in gFTP, please report them to GNOME's Bugzilla at http://bugzilla.gnome.org/ AUTHOR
Brian Masney <masneyb@gftp.org> - http://www.gftp.org/ MARCH 2007 GFTP(1)
All times are GMT -4. The time now is 05:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy