Talk:touch (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Free Software / Software / Computing  (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Free Software, a collaborative effort to improve the coverage of free software on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Software (marked as Low-importance).
Taskforce icon
This article is supported by WikiProject Computing (marked as Low-importance).


Any idea why its called "touch" ? Jay 11:57, 6 Mar 2004 (UTC)

Because you "touch" the file. You don't change it at all, it's as if you reached out and touched it with one finger rather than grabbed it and moulded it into a different shape. Not easy to explain, but the concept works perfectly for me, and presumably for a lot of other Unix geeks too. PeteVerdon

You can also think of it as if you were "touching" the file system - almost as if you were to "prod" it there so that if a file didn't already exist, it now does, and if one previously existed, then it would look new.


Maybe we should reconsider the date and time in the examples? It seems kind of morbid. 'Net 22:51, 10 April 2007 (UTC)

Changed.--Unixguy 10:32, 15 April 2007 (UTC)

windows version[edit]

Is there a Windows cmd under DOS that does the same thing? (talk) 16:45, 25 June 2009 (UTC)

Prompt in Examples Section[edit]

Isn't the # a prompt for the superuser? I'd think it should be a $, the prompt for normal users in Bourne shells. —Preceding unsigned comment added by BZRatfink (talkcontribs) 01:55, 15 August 2010 (UTC)

Agreed. I did not see your comment before editing the page, but I have changed it to $. Excessive use of the root account is very common in hobbyist Linux users, but far less so by professional system admins, especially those who first learned their skills on true Unix operating systems like AIX, HP-UX, Solaris etc. Drkirkby (talk) 09:14, 20 February 2012 (UTC)

Is there a way to modify the creation date of symbolic links?[edit]

'touch' does not work on links, but is there any way to change the creation date of links? Drkirkby (talk) 09:15, 20 February 2012 (UTC)

The simple way to change the date on a link is to remove it and recreate it. There is some controversy over the concept of a creation date for Unix files. It's really not the creation date of the file or link, it's the inode modification date.

This does not describe the Unix touch command[edit]

Many of the examples given will not work on Solaris, which is a certified Unix operating system. The reason for this is that many of the examples are making use of GNU extensions, which are not in the Unix standard. Here is the specification of touch

I will remove the non-standard examples. — Preceding unsigned comment added by (talk) 20:08, 26 January 2014 (UTC)