Compare commits
2 Commits
dfc28916b7
...
ee398fc687
Author | SHA1 | Date | |
---|---|---|---|
ee398fc687 | |||
340d2e4ce7 |
@ -24,10 +24,10 @@ function askYesNo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_logs3days(){
|
_logs3days(){
|
||||||
files3d=($(find ~/ -mtime -3 -iname "*logs*" -o -mtime -3 -iname "*vm_lic*" -o -mtime -3 -iname "*vm_node*" -o -mtime -3 -iname "*short-logs*"));
|
# files3d=($(find ~/ -mtime -3 -iname "*logs*" -o -mtime -3 -iname "*vm_lic*" -o -mtime -3 -iname "*vm_node*" -o -mtime -3 -iname "*short-logs*"));
|
||||||
# find ~/ -mtime -3 -iname "*logs*" -o -mtime -3 -iname "*vm_lic*" -o -mtime -3 -iname "*vm_node*" -o -mtime -3 -iname "*short-logs*" -printf '%TY-%Tm-%Td %TT %p\n' | sort -r
|
files3d=($(find . -maxdepth 1 -mtime -3 -iname "*logs*" -o -mtime -3 -iname "*vm_lic*" -o -mtime -3 -iname "*vm_node*" -o -mtime -3 -iname "*short-logs*"));
|
||||||
if [[ ${#files3d[@]} >0 ]];then
|
if [[ ${#files3d[@]} >0 ]];then
|
||||||
echo -e "\n*********************** platform's logs for last 3 days **************************\n";
|
echo -e "\n*********************** platform's logs for last 3 days *************************\n";
|
||||||
for item3d in ${files3d[*]}
|
for item3d in ${files3d[*]}
|
||||||
do
|
do
|
||||||
# printf " %s\n" $item
|
# printf " %s\n" $item
|
||||||
@ -35,12 +35,12 @@ _logs3days(){
|
|||||||
done
|
done
|
||||||
echo -e "\n*********************************************************************************\n";
|
echo -e "\n*********************************************************************************\n";
|
||||||
else
|
else
|
||||||
echo -e "\n**************************** Logs are not founded:( Just Do It! *****************\n";
|
echo -e "\n************************** Logs are not founded:( You Can Do It! *****************\n";
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
_remove_logs (){
|
_remove_logs (){
|
||||||
files=($(find ~/ -mtime +3 -iname "*logs*" -o -mtime +3 -iname "*vm_lic*" -o -mtime +3 -iname "*vm_node*" -o -mtime +3 -iname "*short-logs*"));
|
files=($(find . -maxdepth 1 -mtime +3 -iname "*logs*" -o -mtime +3 -iname "*vm_lic*" -o -mtime +3 -iname "*vm_node*" -o -mtime +3 -iname "*short-logs*"));
|
||||||
|
|
||||||
if [[ ${#files[@]} >0 ]];then
|
if [[ ${#files[@]} >0 ]];then
|
||||||
echo "founded platform's logs older than last 3 days";
|
echo "founded platform's logs older than last 3 days";
|
||||||
@ -208,7 +208,7 @@ node_collect() {
|
|||||||
|
|
||||||
_help(){
|
_help(){
|
||||||
# about script
|
# about script
|
||||||
version="11/04/23"
|
version="15/04/23"
|
||||||
echo -e "*********************************************************************************";
|
echo -e "*********************************************************************************";
|
||||||
echo -e "*\t\t\tISPsystem technical support\t\t\t\t*";
|
echo -e "*\t\t\tISPsystem technical support\t\t\t\t*";
|
||||||
echo -e "*\t\t\tLog's script ver.: $version\t\t\t\t*";
|
echo -e "*\t\t\tLog's script ver.: $version\t\t\t\t*";
|
||||||
|
Reference in New Issue
Block a user