title: curl request with arguments from "find" command
body: <p>I have the bash script which makes pg_dumpall and uploads to my FTP server.</p>
  
  <pre><code>#/bin/bash
  timeslot=`date +\%Y-\%m-\%d-\%H:\%M:\%S`
  backup_dir="/var/lib/backup"
  name=recycle_backup_$timeslot.sql.gz
  set -e 
  
  find /var/lib/backup/*.sql.gz -mtime +7 -type f -exec rm -rvf {} \; -exec curl -p --insecure ftp://aaa.bbb/backup/{} --user user:password -Q 'DELE backup/'{} \;
  
  echo $timeslot "Running docker container to backup Postgresql"
  
  sudo docker run --rm \
          -t \
          --name postgres-backup \
          -v "/var/lib/backup":"/mnt" \
          -w "/mnt" \
          -e PGPASSWORD="password" \
          --entrypoint=/usr/bin/pg_dumpall \
          postgres:9 \
          -h 1.2.3.4 -U postgres | gzip -9 &gt; $backup_dir/$name
  
  
  echo "Your back is successfully stored in " $backup_dir
  
  curl -T /var/lib/backup/$name ftp://aaa.bbb/backup/ --user user:password
  </code></pre>
  
  <p>It cleans up all old .sql.gz files (older than 7 days).</p>
  
  <p>After these steps, the script makes a docker container with Postgres, runs commands to make backup and saves it locally to <strong>/var/lib/backup/filename.sql.gz</strong>.</p>
  
  <p><strong>The problem</strong> is I can't clean up files on my FTP server with arguments that "<strong>find</strong>" returns.</p>
  
  <pre><code>find /var/lib/backup/*.sql.gz -mtime +7 -type f -exec rm -rvf {} \; -exec curl -p --insecure ftp://aaa.bbb/backup/{} --user user:password -Q 'DELE backup/'{} \;
  </code></pre>
  
  <p>How to add the argument {} from find command to this curl request? <code>-Q 'DELE BACKUP/'{} \;</code></p>
  
  <p>Thanks for the support.</p>