[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Findutils-patches] xargs problem

From: aws backup
Subject: Re: [Findutils-patches] xargs problem
Date: Wed, 21 Dec 2016 01:09:22 +0200

Hello Assaf,

thank you. I know awscli. It has less features then s3cmd. I simplified the 
script here (--acl-public -m video/mp4 
--add-header=Cache-Control:public,max-age=2052000) sometimes I use even the 
invalidate option. s3cmd has also a sync command.
But it's not about syncing two folders. The local folder has not the same 
content as the bucket. It's about uploading videos which I add there and 
re-uploading if I replace them with a newer version. Therefore I need the 
construct to tell s3cmd which file to upload.

Thank you for your input.


> On 21 Dec 2016, at 00:54, Assaf Gordon <address@hidden> wrote:
> Hello,
> On 12/20/2016 04:35 PM, aws backup wrote:
>> s3cmd put "$1" s3://bucket/ \
>>   | tee /path/to/logfile.txt \
>>   | tee >(mail -s 'Upload $filename' address@hidden <mailto:address@hidden>) 
>> \
>>       && /usr/local/bin/terminal-notifier -message "s3cmd Upload of 
>> '$filename' done"*
> Slightly off-topic,
> but if you're open to using a different program,
> then amazon's official python interface (awscli) can synchronize the entire 
> directory for you, without having to use 'fwswatch+xargs' to handle 
> individual files:
>    $ sudo pip install awscli
>    $ aws configure
>    [ set your aws keys ]
>    $ aws s3 sync --exclude "*" --include "*.mp4" /path/to/local/files  
> s3://bucket/key
> It will print a list of uploaded files which you can them email (with some 
> progress information noise).
> Combine it with fswatch or inotify to detect changes in a directory and 
> re-run sync - might be easier than xargs+s3cmd.
> - assaf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]