15-09-2022, 14:49
0
Kod:
#!/bin/bash
ps ax -o uname,pid,etimes,command | grep -v root | while read -r username pid time com ;
do
if [[ $time -gt "3600" ]];
then
echo Proces $username $pid $com -wykonuje sie: $time sekund to jest `date "+%j dni %H godzin %M minut %S sekund" -d @$time` | >&1
fi
done
if [ $1 !=" " ];
then
exit 2
else
exit 0
fi