SORU
21 Mayıs 2013, Salı


Kontrol bash klasör boyutu

Dizin boyutu hesaplayan bir script yazmaya çalışıyorum ve eğer boyutu az 10 GB, ve daha sonra 2 GB bazı eylem yapın.klasör adımı söylemen gerek var mı?

# 10GB
SIZE="1074747474"


# check the current size
CHECK="`du /data/sflow_log/`"

if [ "$CHECK" -gt "$SIZE" ]; then
       echo "DONE"
fi

CEVAP
21 Mayıs 2013, Salı


Yapabilirsiniz:

du -h your_directory

hedef dizin boyutunu verecektir

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Huot Media

    Huot Media

    7 Mayıs 2010
  • New Challenger - Game Reviews

    New Challeng

    20 Temmuz 2006
  • technodromeband's channel

    technodromeb

    28 NİSAN 2011