Ledger Nano X - The secure hardware wallet
SHARE
TWEET

HendriXXX

a guest Apr 9th, 2020 150 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. root@www:~# cat attach_test/pdf_compress.sh
  2. #!/bin/bash
  3.  
  4. cd /var/www/foorumi/attachments
  5.  
  6. find . -name '*.dat' -mtime -1 | xargs file -i | grep 'pdf' | cut -d: -f1 > "24h-pdf-compress-"`date +"%d-%m-%Y"`".txt"
  7. find . -name '*.dat' -mtime -1 | xargs file -i | grep 'pdf' | cut -d: -f1 | while read -r file
  8.  
  9. do
  10.         touch -r "$file" "dummy_file"
  11.         newname="$(dirname "$file")/new_$(basename "$file")"
  12.         ps2pdf "$file" "$newname" || continue
  13.         rm "$file"
  14.         mv "$newname" "$file"
  15.         touch -r "dummy_file" "$file"
  16.         rm dummy_file
  17. done
  18.  
  19. mv "24h-pdf-compress-"`date +"%d-%m-%Y"`".txt" /root/24h_pdf_compress_log
  20. find . -iname '*.dat' -user root -exec chown www-data:www-data {} \;
  21.  
  22. exit 0
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