Creating a file in csh

L. R. DuBroff lrd at drusd.UUCP
Sat Apr 20 08:15:18 AEST 1985


It has been noted by many respondents that "touch filename" will not
create an empty file if filename exists.

Touch(1) has another "gotcha!", at least in all UNIX(tm) systems
that I have used.  You may say "touch [-amc] [time_date] filename",
where time_date is a numerical string that indicates the time and
date to which you want to reset the access or modification (default)
time of the file (-c prevents file creation if filename did not exist).
Thus, "touch 12345" will NOT create an empty file named 12345, but will
instead return:

	date: bad conversion

In order to use touch to create an empty file named 12345, you need to
say:  "touch ./12345"



More information about the Comp.unix mailing list