Understanding shell
Hi! I was looking at a manual on how to install Apache, MySQL and PHP on Linux. Can someone explain to me what these lines mean? I would like to further understand the commands.
#cd /etc/rc3.d #ln -s ../init.d/mysql S85mysql #ln -s ../init.d/mysql K85mysql #cd /etc/rc5.d #ln -s ../init.d/mysql S85mysql #ln -s ../init.d/mysql K85mysql #cd ../init.d #chmod 755 mysql Thank you very much. |
Have a look at
Code:
# man ln The command Code:
#ln -s ../init.d/mysql S85mysql For chmod yoiu can have a look at this homepage: http://catcode.com/teachmod/ Regards, Jens |
Actually, the "link" command is far superior to a "shortcut". It actually creates a second entry in the directory entry with the same "-i-node" (pointer to the file). So while changes in one file get reflected in the linked one also (as you might expect), when you are done with the fisrt entry, you can delete it while the file would still exist under the second name. In the case of a 'shortcut", the shortcut would cease to work.
All Unixes (includiing Linux) have various run levels. 0 - single user to 5 (GUI - I think). The parameters in /etc/rc?.d (? ranging from 2 to 5), contain the parameters that will be used to rebuild the "kernel". Unlike DOS, which relies on the extension (like EXE, COM, pdf, doc) to tell the nature of the file, Unix relies on the permission "mode" thus "chmod" for change mode. End |
Quote:
But the thing is that a soft symlink is created more like in windows (apart from as you said that it's not a file - the referens to the file it's pointing to is saved in the directory file instead) - it is just a plain file which is pointing to a location in the UNIX filesystem i.e. '/etc/lilo.conf'. That is why a soft link stops to work after you've removed the file they are pointing to. For a newbie I normally skip the hard link discussions, because usually the soft ones works perfectly thrueout the systems because most knows that if you delete source file the symlink stops to work and that's the only problem. Hardlinks are more important if one is working with links to library files or big very important files...in my opinion. Ciao, /J |
All times are GMT -5. The time now is 07:49 AM. |