All greetings!
Now write a script sh and a problem:
It is necessary to determine the size of the directory on the specified path (eg /var/log/test)
and if it is> 100Mb, it is removed in a place with subdirectories and files.
---------
To work with the files I use:
If anyone knows how to do this with directories please please.
Thanks in advance.
Now write a script sh and a problem:
It is necessary to determine the size of the directory on the specified path (eg /var/log/test)
and if it is> 100Mb, it is removed in a place with subdirectories and files.
---------
To work with the files I use:
# find /var/log/mysql.log-size +256000 k | xargs rm
If anyone knows how to do this with directories please please.
Thanks in advance.