findutils-patches
[Top][All Lists]
Advanced

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

Re: [Findutils-patches] xargs problem


From: Assaf Gordon
Subject: Re: [Findutils-patches] xargs problem
Date: Tue, 20 Dec 2016 17:54:41 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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]