Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

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.

share|improve this answer
    
Thanks a lot @lgarzo. You were right. I copy pasted it from a website but I never would have guessed that different (-) . You saved my day. :) –  Vivek Apr 25 '12 at 15:20
    
You're welcome! It's good to know that my perversion for typography comes in handy sometimes. –  lgarzo Apr 25 '12 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.