[ale] Question about ftp'ing files

Chuck Payne terrorpup at gmail.com
Wed Jan 16 23:00:47 EST 2013


Can't use rsync, I love to. I am going from Linux to Windows, no CIFS
either. It sucks.  Let me look at ftp -i, I am on CentOS and it seem
that version of ftp is limited.

Thanks,

Chuck

On Wed, Jan 16, 2013 at 10:54 PM, Jim Kinney <jim.kinney at gmail.com> wrote:
> I would use rsync for this.
>
> At the least, loop through the FILE=  to build a list. What's happening is
> touch3 overwrites touch2 which overwrites touch1.
>
> for myfile in $(ls -rt <path>/<file_pattern>); do FILE="${FILE} ${myfile}";
> done
> do ftp and add -i flag so multiple files can be pushed up at once without
> prompting when using mput instead of put.
>
> On Wed, Jan 16, 2013 at 10:37 PM, Chuck Payne <terrorpup at gmail.com> wrote:
>>
>> 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
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>
>
>
>
> --
> --
> James P. Kinney III
>
> Every time you stop a school, you will have to build a jail. What you gain
> at one end you lose at the other. It's like feeding a dog on his own tail.
> It won't fatten the dog.
> - Speech 11/23/1900 Mark Twain
>
> http://electjimkinney.org
> http://heretothereideas.blogspot.com/
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



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