Philip Newton (pne) wrote,
Philip Newton
pne

  • Mood:

The things you learn, part 1287

Today, I found out that Unix will let you execute zero-length files; presumably, it treats them as shell scripts which do nothing and return 0.

I found that after a Perl script I had written for a cow orker started producing logfile errors about how files are open when they aren't, after they had reinstalled the system; turned out that /sbin/fuser, which I was using to check whether a file was open (and which returns 0 if they're open, non-0 if they're not) was suddenly only 0 bytes big. (And /usr/sbin/lsof, which I could have also used, was also 0 bytes.)

Bizarre.

Tags: the things you learn
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments