Talk:Touch (Unix)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology 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.
 ???  This article has not yet received a rating on the project's importance scale.
 

name[edit]

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.

Examples[edit]

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? 65.65.71.253 (talk) 16:45, 25 June 2009 (UTC)

http://en.wikipedia.org/wiki/Touch_%28Unix%29#External_links

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 http://pubs.opengroup.org/onlinepubs/7990989775/xcu/touch.html

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