@wolfv - " ?"
, , :
fx=""
while read f; do
if ! [[ "$f" = "thefileiwanttorsync" ]]; then
[[ ${fx} = "" ]] || fx+="|"
fx+="^${f}\$"
fi
done < <(ls -1 /directory/path)
gsutil rsync -x "${fx[@]}" /directory/path gs://bucket/some/directory/path
@wolfv - "Excluding all files except the necessary one will not work, since random files will be saved in this directory."
I understand the first sentence, but not the second.
source
share