1

On a regular basis I change to Desktop using the command cd in a Terminal. But from a few days ago when I use the command cd in a Terminal to change to Desktop, like the following line:

cd /home/myname/Desktop

I am getting the following message:

bash: cd: /home/myname/Desktop : No such file or directory

But when using cd to change for Downloads for example:

cd /home/myname/Downloads 

the command works properly. It seems like somehow the link to Desktop was missed. Can anybody help me to fix this problem?. I'm sure the problem is not with the path because I have ever used this way.

Here is the output to ls -l /home/myname | grep Desktop as Wayne_Yux asked:

drwxrwxr-x 3 myname myname 4096 Nov 6 13:52 Desktop
drwxr-xr-x 30 myname myname 4096 Nov 2 09:09 Desktop
5
  • 1
    can you please edit your question and include the output of ls -l /home/myname? or ls -l /home/myname | grep Desktop, if the former is very long
    – Wayne_Yux
    Nov 6, 2015 at 14:32
  • Done Wayne_Yux. Now you can see the requested output in the question. Nov 6, 2015 at 23:30
  • David, how about this? ls | LC_ALL=C sed -n l | grep Desktop
    – tweej
    Nov 7, 2015 at 0:41
  • Hi tweej. The output to yours was: Desktop$ Nov 7, 2015 at 1:31
  • @DavidStalin there were really two lines in the output? This should not happen, because Ubuntu does not allow duplicated file names... Can you check, if one of those has a space at the end?
    – Wayne_Yux
    Nov 7, 2015 at 13:05

1 Answer 1

1

I think creating this dir with mkdir -p /home/myname/Desktop is the only way. Maybe you removed it accidentally.

4
  • Yes Anton, I did it. Now I can change to Desktop using cd. But if I want to change to /home/myname/Desktop/Sage/sage-5.10 I have also to execute your suggested commend. I did it because I need to run the software Sage, which I usually did by changing to sage-5-10 and then command ./sage and the sage will run. But now I commited the error of running your command this way: Nov 6, 2015 at 23:36
  • mkdir -p /home/myname/Desktop/Sage/sage-5.10/sage Nov 6, 2015 at 23:37
  • Now when typing ./sage I get the result bash : ./sage: Is a directoy . How can I undo thid?. Nov 6, 2015 at 23:40
  • Also when I shut down the computer and reboot the result of applying mkdir is "forgotten" and again I can't change using cd. Nov 7, 2015 at 0:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .