11

listing processes older than n days

view full story
linux-howto

http://www.unix.com – Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days Code: UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\ awk '$5 !~ "[0-9][0-9]"' | awk '($5 ~ "$(date "+%b")") && ($6 <= "$(echo $(date "+%e") - 5 | bc)")' but is erroring out with: Code: syntax error The source line is 1.  The error context is                 ($5 ~ &qu (HowTos)