maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   cd command doesn't work (https://talk.maemo.org/showthread.php?t=81732)

BlackMask 2012-01-20 03:18

cd command doesn't work
 
first of all, i'm new here, so " HI ALL.... :) " and sorry if my post is on the wrong group-place....
so, my n900 got crazy...a week ago, the cd command stopped working..i have the Rootsh installed, i'm in the "sudo gainroot" enviroment and i can't cd...for example, i want to cd /MyDocs/....i get the anoying error message /bin/sh: cd can't cd to /MyDocs/ ...everytime i put a diferent directory name, is says /bin/sh: cd can't cd to (direcrotyname) .... the only cd that works is cd /home/user/

AndrewX192 2012-01-20 03:26

Re: cd command doesn't work
 
Welcome to the Maemo Community.

Are you sure you're not intending to do
Code:

cd /home/user/MyDocs
Your working directory is probably /root instead of of /home/user, so 'cd MyDocs' won't work.

Mike Fila 2012-01-20 03:48

Re: cd command doesn't work
 
even at the /home/user promt you still need to use the complete path eg /home/user/MyDocs

jedi 2012-01-20 09:49

Re: cd command doesn't work
 
Quote:

Originally Posted by Mike Fila (Post 1153097)
even at the /home/user promt you still need to use the complete path eg /home/user/MyDocs

That's not quite right - if your current directory is /home/user, then you only need to:
Code:

cd MyDocs
-note the lack of the leading "/" and the unnecessary trailing "/". If you include the leading "/", then it infers that the "MyDocs" directory is located in the root ("/") directory.

@BlackMask - have a google for a quick intro to the Linux command line - there's gazillions of them out there :)

BlackMask 2012-01-20 11:37

Re: cd command doesn't work
 
thnx a lot for your replies....the thing is the command was working the whole time....whenever i pressed cd /MyDocs/ it went to MyDocs...the problem started a week ago, when i couldn't cd...anyway i will try to unistall my programms, in case some installations corrupted x-terminal...(if i press cd MyDocs, nothing will happen..i must include the "/" in the command)

benny1967 2012-01-20 12:05

Re: cd command doesn't work
 
Quote:

Originally Posted by BlackMask (Post 1153234)
if i press cd MyDocs, nothing will happen

what do you mean by "nothing will happen"?
what do you expect to "happen"?

if nothing happens (=no error message), chances are that you did change your working directory. how did you verify you didn't? do you rely on the directory name being part of the command prompt? or did you check using 'pwd' or at least 'ls'?

sulu 2012-01-20 13:34

Re: cd command doesn't work
 
Quote:

Originally Posted by BlackMask (Post 1153234)
cd /MyDocs/ it went to MyDocs...

That's hard to believe. Technically it's possible but it would require presets of which I fail to see why someone would want to set them.
Are you absolutely sure that it wasn't one of the following?:
Code:

cd MyDocs/
cd ./MyDocs/
cd ~/MyDocs/

The current behavior of your shell seems absolutely correct, as far as we can tell from the info you provided.

BlackMask 2012-01-23 15:18

last night i unistall the uTorrent on my n900, and somehow the command was working again...it appears that when you install the uTorrent watcher on the n900, the programm automatically tries to establish remote connection with the original uTorrent (wich is my PC), taking all the root access of my phone for it... :SSS....anyway it's working now, although i had to write the full path, cd /home/user/MyDocs/...doesn't matter :))
thank you all for your replies!!!!!

demolition 2012-01-23 15:42

Re: cd command doesn't work
 
Small point but easy mistake to make, is to omit the space between 'cd' and the desired directory.

deiviboy 2012-11-15 10:33

Re: cd command doesn't work
 
hi!

i can't cd to mydocs using xterminal but when i use ls i see mydocs are there? I am trying to install nitdroid now im stuck at xterminal when going to the mydocs folder.. please help :confused:


All times are GMT. The time now is 00:23.

vBulletin® Version 3.8.8