0

I am trying to do cd test and get the error bash: cd: too many arguments. I saw other threads saying that doing cd "test" would work but I get the same error message.

Also when I try to do cat test it give me ../../10/wsl

Any help would be greatly appreciated !

Thank you :)

  • 1
    What does type -a cd report? Is it an alias or something? – muru Oct 22 '20 at 02:51
  • @Terrance, I tried typing cd ../../10/wsl but it still give me the same error message. @muru, it give me: cd is aliased to `cd -P tunnel' cd is a shell builtin. – Neo Capo Oct 22 '20 at 02:55
  • @muru Good call! I was off on that one. =) Looks like OP needs to remove the alias on cd. – Terrance Oct 22 '20 at 02:57
  • @Terrance, how would I do this ? According to my assignment I could only use the commands ls, ln, cat and cd. Thank you for you help ! – Neo Capo Oct 22 '20 at 04:11
  • https://askubuntu.com/questions/325368/how-do-i-remove-an-alias – Terrance Oct 22 '20 at 04:13
  • Unfortunately I still get the same error message :( – Neo Capo Oct 22 '20 at 04:21
  • You need to make sure that your ~/.bashrc doesn't have that cd alias in it as well. You can use your favorite editor like gedit and run from a command line gedit ~/.bashrc and look for if it is setting the alias. Do not delete any lines other than just the alias cd='cd -P tunnel' line if that exists or a line similar to that one. – Terrance Oct 22 '20 at 05:03

1 Answers1

0

too many arguments because: when you type cd /mnt/c/user/e xample there is gap between the letters. you have to either

  1. close it like this cd "/mnt/c/users/e xample" or
  2. cd /mnt/c/users/e\ amples

hope it would help.