Guest User

Untitled

a guest
May 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/sh
  2. FILENAME=/tmp/dimc/log # Arquivo de log
  3. MAXSIZE=1073741824 # Tamanho máximo em bytes
  4. SIZE=$(stat -c%s $FILENAME) # Busca o tamanho do arquivo
  5.  
  6. # Verifica se o tamanho está dentro do permitido
  7. if [ $SIZE -lt $MAXSIZE ]; then
  8. echo Tamanho dentro do permitido
  9. else
  10. echo Tamanho acima do permitido
  11. fi
Add Comment
Please, Sign In to add comment