Hello, I have found a bug in `touch' command from fileutils 4.1.8 that `touch -c' wrongly reports an error for non-existent file. (At least) SUSv2 seems to say `touch -c FILE' should not write any diagnostic messages when FILE does not exist.
% touch --version touch (fileutils) 4.1.8 [...] % touch --no-create non-existent-file touch: setting times of `non-existent-file': No such file or directory % Fileutils-3.16 and 4.0's `touch' appear to behave as SUSv2 says, but 4.1 and later version have this problem. Here is a correction I made. 2002-04-16 TAKAI Kousuke <[EMAIL PROTECTED]> * src/touch.c (touch): Don't report an error when --no-create is in effect and error was ENOENT. diff -ru fileutils-4.1.8.orig/src/touch.c fileutils-4.1.8/src/touch.c --- fileutils-4.1.8.orig/src/touch.c 2002-02-16 18:01:38.000000000 +0900 +++ fileutils-4.1.8/src/touch.c 2002-04-16 02:43:23.041293648 +0900 @@ -206,7 +206,7 @@ status = utime (file, &utb); } - if (status) + if (status && !(no_create && errno == ENOENT)) { if (open_errno) error (0, open_errno, _("creating %s"), quote (file)); [patch ends here] Sorry for my poor English. -- TAKAI Kousuke <[EMAIL PROTECTED]> Dept. of Communications and Computer Engineering, Graduate School of Infomatics, Kyoto University, Japan _______________________________________________ Bug-fileutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-fileutils