Sym links point to something... the file that is accessed!

Mike Starke plug-discuss@lists.plug.phoenix.az.us
Fri, 28 Mar 2003 15:19:10 -0500


On Fri, Mar 28, 2003 at 03:02:01PM -0500, Michael Havens wrote:
/_So I was looking at the sym links and realized something:
/_
/_file1 -> file2
/_ 
/_File1 is the link while file2 is the program that is executed when  file1 is accessed. Is this correct?
/_The problem I was having with ln -s is I thought file1 was the actual program.
/_If this is the case then ttyS0 -> /dev/modem says that when you access ttyS0 it really accesses /dev/modem! I know I am repeating myself but I think it is exciting that the the light of dawn is illuminating my darkened mind!
/_

If you were to issue the command:
'ln -s /dev/ttyS0 /dev/modem'
It would look like this if you were to do 'ls -l /dev/modem'
lrwxrwxrwx    1 root     root           10 Mar 28 13:07 /dev/modem -> /dev/ttyS0