inside Habbie's mind

Entries tagged “oneliner”

finding dangling symbolic links

written by peter, on Aug 15, 2007 7:41:00 PM.

find -L . -type l

Replace . with the directory you want to investigate, of course. Works with both GNU and (Free)BSD find. Rationale: -L makes find act on the (transitive closuse of the) target of a symlink - unless the target doesn’t exist, in which case find acts on the symlink itself. So, if the item to act on turns out to be a symlink, it has to be dangling.

SSL certificate expiration

written by peter, on Apr 24, 2006 8:37:00 AM.

A simple oneliner that I’ve had to look up three times now, so I’m blogging it:

openssl s_client -connect secure.gay.nl:443 | 
   openssl x509 -noout -dates