Well, I just looked into /tmp on one of our boxes and noticed that SSHd left behind some (try 400) directories .. Now, I could use a simple rm -rf /tmp/ssh-*, but I didn’t want to kill my current agent forward file.
After looking at the man-page of find, I stumbled about -mtime. And that seems to work out quite well.
1 |
find /tmp -name "ssh-*" -mtime +5 | xargs rm -rf |