Unable to create a symlink to a file
I am not able to create a simple symlink here. When I tried the command
sudo ln –s /home/vivek/Downloads/drush/drush /home/vivek/Documents/where drush is a file inside the folder named drush, I get the following error,
ln: accessing `–s': No such file or directoryThen I tried giving the filename in the target path,
sudo ln –s /home/vivek/Downloads/drush/drush /home/vivek/Documents/drushfor which I got this,
ln: target `/home/vivek/Documents/drush' is not a directoryI even tried getting into the target directory (i.e. /home/vivek/Documents) and typed the following command
sudo ln –s /home/vivek/Downloads/drush/drushBut still got the same error message as follows
ln: accessing `–s': No such file or directoryWhat am I doing wrong here? Why is it expecting a target directory while I am only trying to create a symlink for a file?
1 Answer
Your dash character (–) is different from the minus character (-) used to specify options. (Probably copied code from a web page.)
Try with -s.
Since it does not recognize –s as an option it tries to look for a file.