Randall R Schulz wrote:
Eric,
On Friday 02 December 2005 12:28, Eric E wrote:
Funny, I got the advice to use /usr/bin/touch from IRC... Anyway, it seems to be in both on my machine:
# which touch /usr/bin/touch
# ls /bin/touch /bin/touch
It goes all the way back to the dim dark mists of time. At least to Bell Labs v7 Unix. To wit:
% rpm -q --whatprovides /bin/touch /usr/bin/touch coreutils-5.3.0-20 coreutils-5.3.0-20
It's probably in both places (/usr/bin/touch is a symlink on my system) because over time different versions of Unix (-like operating systems) have put it in different places and having both just prevents a lot of things from breaking.
LSB require all tools required to repair filesystems and mount /usr (which might not be available at boot time) be in /bin, /lib etc. This clearly requires touch (in initialisation scripts): summer@Phascogale:~> ls -l /usr/bin/touch /bin/touch -rwxr-xr-x 1 root root 34276 2005-09-10 13:56 /bin/touch lrwxrwxrwx 1 root root 10 2005-11-26 19:58 /usr/bin/touch -> /bin/touch summer@Phascogale:~> ssh bilby ls -l /usr/bin/touch /bin/touch summer@bilby's password: ls: /usr/bin/touch: No such file or directory -rwxr-xr-x 1 root root 40842 Mar 24 2005 /bin/touch summer@Phascogale:~> ssh gw ls -l /usr/bin/touch /bin/touch Password: -rwxr-xr-x 1 root root 30360 Jul 16 2004 /bin/touch lrwxrwxrwx 1 root root 10 Nov 21 2004 /usr/bin/touch -> /bin/touch summer@Phascogale:~> ssh ns ls -l /usr/bin/touch /bin/touch summer@ns's password: ls: /usr/bin/touch: No such file or directory -rwxr-xr-x 1 root root 31932 Apr 28 2005 /bin/touch summer@Phascogale:~> Ihave some diversity hee:-) gw is Debian/Sarge ns is WBEL Bilby was Fedora Core 3, is overlaid with much self-built RHEL 4. Phascogale is SUSE 10. Oh, and here is OS X summer@Phascogale:~> ssh bilby ssh eagle ls -l /usr/bin/touch /bin/touch summer@bilby's password: ls: /bin/touch: No such file or directory -r-xr-xr-x 1 root wheel 18496 Mar 22 2005 /usr/bin/touch summer@Phascogale:~>