SHARE
TWEET

Untitled

a guest Jun 16th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. df -P /dev/sda1 | grep /dev/sda1 | awk '{ print $5}' | sed 's/%//g'
  2.      
  3. df -P /dev/disk/by-uuid/0E5E17800E5E1780 | grep /dev/disk/by-uuid/0E5E17800E5E1780 | awk '{ print $5}' | sed 's/%//g'
  4.      
  5. #!/bin/bash
  6. inputa=90
  7. #outputa=$(df -P /dev/sda1 | grep /dev/sda1 | awk '{ print $5}' | sed 's/%//g') #disque sda1 /home/user/Documents/ipcams/ipcam
  8. outputa=$(df -P /dev/disk/by-uuid/0E5E17800E5E1780 | grep /dev/disk/by-uuid/0E5E17800E5E1780 | awk '{ print $5}' | sed 's/%//g')
  9.  
  10. if  [ "$inputa -lt $outputa" ]
  11. then
  12.      find /home/user/Documents/ipcams/ -type f -name "*.mp4" -print > /home/user/ipcam.log
  13.     (date +"%Y-%m-%d Heure:  %H-%M-%S") >> /home/user/ipcam.log
  14.       echo Pourcentage $outputa "%" >> /home/user/ipcam.log
  15.  
  16. else echo rien
  17.  
  18. fi
  19.      
  20. $ df -P /dev/sda1 | awk 'NR == 2 { print substr($5,1,length($5)-1) }'
  21. 80
  22.  
  23. $ df -P /dev/disk/by-uuid/79b5546e-5b3e-4299-becb-5f0cad06cf5f | awk 'NR == 2 { print substr($5,1,length($5)-1) }'
  24. 80
  25.      
  26. df displays the amount of disk space available on the file system containing each file name argument.
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