PDA

View Full Version : [all variants] Difference between cp -s and ln -s



KuRA96
November 24th, 2012, 11:27 AM
As the title says.

I know both used to make symbolic links, but is there any difference between cp -s and ln -s ?

thanks in advance :)

mlentink
November 24th, 2012, 11:35 AM
cp is the copy command, not used to make links.
You can quickly find what a commanc does by typing info in a terminal windows followed by the command, like:

info cp

ajgreeny
November 24th, 2012, 01:16 PM
cp -s can be used to make a link to a file or files; ln -s would more commonly be used to make a soft link to a source folder from a destination folder.

I am sure there will be other differences that I'm not aware of, but that seems to be the main thing I can see.