









|
[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[NMLUG] Move files via FTP
- Subject: [NMLUG] Move files via FTP
- From: timothyemerick at yahoo.com (Tim Emerick)
- Date: Wed Jul 5 17:14:12 2006
I have a small project that I need some help with. My bash scripting skills are terrible and I haven't been able to find a utility to do what I want which is this in a nutshell.
Here's some pseudo-code:
1. Look at a particular directory on local computer.
2. List all files that are older than 15 minutes (file might still be in the process of creation)
3. Copy those files to an FTP server that requires a username/password combo.
4. If the file already exists on the FTP server then throw somebody an email letting them know.
5. If the transfer is successful then delete the original (or move it to another directory).
I would like to run this every hour via cron.
Anything out there already existing?
Thanks!
Tim
PS. Doing a little googling while I was composing helped me figure out a couple of things.
1. I can get a listing of files older than 15 minutes by using the following. find . -amin +15
2. I can use .netrc to automagically login to the remote ftp server with my credentials.
3. How do I do 2 things with my list of found files??? (ftp put and then delete/move)?
4. How do I get an email of just file tranfer errors? (file already exists, etc)
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.b9.com/pipermail/nmlug/attachments/20060705/0a4a7754/attachment.htm
|
|