Linux ossutil pulls all files to the server

Time:2021-1-24

code

Record it. It will be useful next time. Come back and copy it.

#!/bin/bash

Ossutil = / APP / tools / ossutil64 # ossutil path

files=$($ossutil ls oss://xh-files -s   | grep oss://)
for file in ${files[@]}
do
filename=$(basename $file)
$ossutil cp -f  $file  './'$filename
done

function

Linux ossutil pulls all files to the server

This work adoptsCC agreementReprint must indicate the author and the link of this article

Concentrate on your study and don’t fool around