Talk:touch (command)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


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— Preceding undated comment added 20:37, 25 May 2005‎
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.— Preceding unsigned comment added by 216.199.190.150 (talk) 20:48, 10 August 2005 (UTC)[reply]
I think that the name is a pun to Michaelangelos work `The Creation of Adam' where God creates Adam with a touch of the finger. — Preceding unsigned comment added by Cluzz (talkcontribs) 15:33, 25 April 2020 (UTC)[reply]

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)[reply]

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

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)[reply]

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)[reply]

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)[reply]

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)[reply]

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)[reply]