Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

dyunin Apr 9th, 2020 (edited) 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. ftp_dir="path/to/catalog"
  4. archive_dir="$ftp_dir/archive"
  5. datetime=$(date +%d.%m.%Y)
  6. remove_days="30"
  7.  
  8. if [[ $(find $ftp_dir -maxdepth 1 -type f | wc -l) == 0 ]]; then
  9.  exit 0
  10. else
  11.   mkdir $archive_dir/$datetime
  12.   find $ftp_dir -maxdepth 1 -type f -print0 | xargs -0 -I {} mv {} $archive_dir/$datetime
  13.   chown -R www-data: $archive_dir/$datetime
  14. fi
  15.  
  16. find $archive_dir  -mtime +$remove_days -delete
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top