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 directory

Then I tried giving the filename in the target path,

sudo ln –s /home/vivek/Downloads/drush/drush /home/vivek/Documents/drush

for which I got this,

ln: target `/home/vivek/Documents/drush' is not a directory

I even tried getting into the target directory (i.e. /home/vivek/Documents) and typed the following command

sudo ln –s /home/vivek/Downloads/drush/drush

But still got the same error message as follows

ln: accessing `–s': No such file or directory

What am I doing wrong here? Why is it expecting a target directory while I am only trying to create a symlink for a file?


Solution 1:

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.