[ale] Question about ftp'ing files
Chuck Payne
terrorpup at gmail.com
Wed Jan 16 22:37:11 EST 2013
Guys,
I have a question, I have a very simple ftp script
-----------------Script Begins----------------------------
#!/bin/bash
# To find the latest files and upload them to process server
FILE=$(ls -rt /chroot/home/fl/fl_sdirc | awk 'END{ print $NF }')
ftp -n 192.168.0.8 <<+
user user password
binary
put $FILE
quit
------------------Script Ends---------------------------------------
But, I think my script is limited and might not have a way to check if
files have been uploaded and might not get all the
This line seems to only return one file
ls -rt /chroot/home/fl/fl_sdirc | awk 'END{ print $NF }'
I did this as a test, I ran the following command
touch touch1
touch touch2
touch touch3
but only returns touch3, not touch1, touch2 where only seconds part.
If that the case, my script will miss uploading files. Is there a
better way of doing this? I know there is. just I'm bit brain dead
trying think of a good way. I could set up a log and move files, but
that will break my KISS rule, or do I need that to make it work.
--
Terror PUP a.k.a
Chuck "PUP" Payne
(678) 636-9678
-----------------------------------------
Discover it! Enjoy it! Share it! openSUSE Linux.
-----------------------------------------
openSUSE -- en.opensuse.org/User:Terrorpup
openSUSE Ambassador/openSUSE Member
Community Manager -- Southeast Linux Foundation (SELF)
skype,twiiter,identica,friendfeed -- terrorpup
freenode(irc) --terrorpup/lupinstein
Register Linux Userid: 155363
Have you tried SUSE Studio? Need to create a Live CD, an app you want
to package and distribute , or create your own linux distro. Give SUSE
Studio a try. www.susestudio.com.
See you at Southeast Linux Fest, June 7-9, 2013 in Charlotte, NC.
www.southeastlinuxfest.org
More information about the Ale
mailing list