When I said,
... but unfortunately on the system in question touch -c always
returns success whether the file exists or not.
| Interesting. What system are you doing this on? touch -c
| on both Linux and Solaris return a non-zero exit status. Only other system
| have available to me to test is Irix, which is powered down right now.
There are some servers on it where touch -c exits 1 if the file doesn't
exist, but incoming mail delivery processes happen on one where it exits 0.
I don't know the names of the OSes; uname -a doesn't say anything
On another provider running NetBSD, touch -c also exits 0 if the file doesn't
exist. I'm guessing that it would exit non-zero only when the file exists
but the user lacks permission to modify the inode.
I wonder what would happen, though it would be of no use to me, if the file
didn't exist but the name lay in a directory where the user had no write
permission. Probably also an exit of 0, since touch -c wouldn't attempt to
create a file.
procmail mailing list