Sponsored Content
Full Discussion: Upload latest file to ftp
Top Forums Shell Programming and Scripting Upload latest file to ftp Post 302954383 by liviusbr on Monday 7th of September 2015 10:00:53 AM
Old 09-07-2015
Upload latest file to ftp

Hi,

I want to create a script that parses the content of a file (on each line there is a filename with full path containing the latest fiels created on that day) and uploads every file to a ftp location.
Any elegant way to do it ?
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Getting latest file from ftp

Hi, i have multile JAMA01.DAT.* files in my ftp. how can i get the latest file in from the ftp by executing the script :rolleyes:? Regards, Arun S (3 Replies)
Discussion started by: arunavlp
3 Replies

3. UNIX for Dummies Questions & Answers

ftp command to get latest file

Hi, I would like an FTP command or series of commands to get only the latest file. Is that possible? Thanks in advance. (2 Replies)
Discussion started by: laiko
2 Replies

4. Shell Programming and Scripting

ftp the latest file from unix to windows

Hi, I have a ftp script to ftp files from unix to windows. Now i need to pull the latest file from unix to windows. It is not working. ftp -nvi $SERVER > ${FILE_DIR}/NavigationftpLog << EOD user $USER $PWD lcd $FILE_DIR echo "the local directory is $FILE_DIR" cd $Remote_PATH echo... (2 Replies)
Discussion started by: ammu
2 Replies

5. Shell Programming and Scripting

How to get latest file via FTP session

Hello , My requirement is as follows: I want to connect to a remote FTP server using FTP and then get the latest file from server location can u pls share code snippet for this ? Regards, Suresh (4 Replies)
Discussion started by: sureshg_sampat
4 Replies

6. Shell Programming and Scripting

ftp put in shell script -- whole file doesn't upload

Hi I'm having some trouble with a bash shell script that I'm writing. In the script, I'm trying to upload a file to a backup repository using ftp, but the whole file doesn't get uploaded. This is the file's properties at the start (I've highlighted the file size in red): -rw-r--r-- 1 root... (2 Replies)
Discussion started by: Viola
2 Replies

7. Shell Programming and Scripting

Question about how to ftp download the latest file from a directory

Dear all, Hope you are doing well. I am in trouble to write a shell for ftp downloading the latest file from remote server. Situation: There is a directory named 'weekly' which contains .csv files with the following pattern: RES_EN_100417-080003.csv.Z. The new file is generated... (3 Replies)
Discussion started by: kel1014
3 Replies

8. Shell Programming and Scripting

Curl ftp upload success but no file exist on the server !!!!

hello, I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command upload files... (5 Replies)
Discussion started by: laraaj
5 Replies

9. 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

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
dcut(1) 						      General Commands Manual							   dcut(1)

NAME
dcut - Debian archive .commands file upload tool SYNTAX
dcut [options] [host] [command [, command]] dcut -U filename [host] DESCRIPTION
dcut creates and / or uploads .commands files for the Debian FTP archive upload queue. It is a companion for dput and uses dput configura- tion files. As with dput, you can specify a host defined in the dput configuration file. In case your host is funnily named, i.e. it could mistaken for a command, you may also use a command line option to specify the host. In default operation mode (unless you request to upload an existing file), the host description is followed by a comma-seperated list of commands. (Semicolons also work but require shell escaping.) COMMANDS
Presently supported commands are rm, reschedule and cancel. rm can be used to remove files from the UploadQueue directories. dcut generates commands that search the subdirectories automaticall, but you can also specify --nosearchdirs and then target individual UploadQueue direc- tories, i.e. either filenames without path for regular incoming or DELAYED/#-day/filename. Wildcards are accepted. reschedule changes-file #-day can be used to move an upload from any DEFERRED queue to #-day (use 0-day for immediate processing). cancel changes-file cancels an upload from DEFERRED. Both reschedule and cancel take a complete basename of a changes file as argument and operate on the whole upload, they process the changes and all files mentioned by it. The authorative documentation for the commands interface can be found at "ftp://ftp.upload.debian.org/pub/UploadQueue/README". The options try to resemble dput's to the extent possible. Note that dcut calls debsign to sign any commands file generated. In particular, debsign does basic syntax checking on the commands you specify. OPTIONS
-c filename, --config=filename Use config file filename. -d, --debug Print debug messages. -h, --help Print help information and exit. --host=host Upload to host (as found in the dput configuration). Use this if your host is named like one of the commands. -m maintainer, --maintainer=maintainer Use maintainer (full email) for the uploader field and gpg key selection. This has no effect when --upload is used. -k keyid, --keyid=keyid Use keyid for signing. Default is to let debsign choose a keyid. This has no effect when --upload is used. -O filename, --output=filename Write commands file to filename instead of uploading. You sould not specify a host when using this option. Also, this option should not be used with --upload. Both filename and filename.asc will be overwritten. -P, --passive Use passive ftp instead of active. -s, --simulate Simulate an upload only. -U filename, --upload=filename Upload commands file. Note: No checks (syntax or presence/validity of signature) are currently performed. -i filename, --input=filename Read an input changes file to create a commands file that can remove the files listed in the .changes file from the upload queue. -v, --version Print version information and exit. ENVIRONMENT
The program uses the environment variables DEBEMAIL or EMAIL and DEBFULLNAME to populate the uploader field. Also, environment variables may be used in search of a suitable place for temporary files. EXAMPLES
To upload a GPG signed commands file that removes dput_0.9.2.33_all.deb file from the queue, one would have to do $ dcut rm dput_0.9.2.33_all.deb This creates and uploads a commands file that looks like the following: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Uploader: Foo Bar <foo@bar.org> Commands: rm dput_0.9.2.33_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYKAkisYx0ACgkQ4eu+pS04mIfwLQCg85XVpae/LHLrbvzywcQNt9PS ztsAoMgw6HjcI9flfmwjgMiapcu379Pu =fjp0 -----END PGP SIGNATURE----- To upload a GPG signed commands file that removes files named in dput_0.9.4_i386.changes from the queue, one would have to do $ dcut --input dput_0.9.4_i386.changes This creates and uploads a commands file that looks like the following: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Uploader: Foo Bar <foo@bar.org> Commands: rm --searchdirs dput_0.9.4.dsc rm --searchdirs dput_0.9.4.tar.gz rm --searchdirs dput_0.9.4_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYKAkisYx0ACgkQ4eu+pS04mIfwLQCg85XVpae/LHLrbvzywcQNt9PS ztsAoMgw6HjcI9flfmwjgMiapcu379Pu =fjp0 -----END PGP SIGNATURE----- If you've uploaded packages with the --delayed option (uploaded to DEFERRED queue), then use the cancel command with a .changes file. $ dcut cancel dput_0.9.4_i386.changes This creates and uploads a commands file just like the other commands. LICENSE
This program is distributed under the terms of the Gnu General Public License, Version 2 or later. BUGS
Please direct bug reports and comments to the author. Your feedback is appreciated. If you're using Debian packages, file bugs against the dput package. FILES
dcut makes use of the dput configuration files: /etc/dput.cf System dput configuration file. ~/.dput.cf User dput configuration file. Much helpful input and some stolen code from dput author Christian Kurz. SEE ALSO
dput(1), dput.cf(5) ftp://ftp.upload.debian.org/pub/UploadQueue/README AUTHOR
Thomas Viehmann <tv@beamnet.de> January 2004 dcut(1)
All times are GMT -4. The time now is 06:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy