"cd \" ?
I sometime mistakenly type "cd \" to enter root directory
should be "cd /" opsite of window "cmd" And a promp ">" comes out. What is it for? |
When you enter a command, without parameters, it will (depending on the command) allow you to enter those parameters after entering the command. So, for instance, type "cd" and press enter. You'll get >
Then, type a directory. and press enter. It will show you the contents of that directory the same as cd <dir> would. It will then allow you to enter as many as you like. To quit, press CTRL+C |
If you do / and hit enter, it continues the command on the next line is all.
|
if u enter cd on commandline, it will change ur current directory to ur home directory.
|
Quote:
What's happening here is that \ is used by bash (the shell) to "escape" characters, which means taking from those characters their special meaning, so that they become normal characters. For bash: - $ is for introducing a variable, such as $HOME. \$ is simply a "dollar" sign. - * is for expanding to any number of characters, matched against files in current directory. \* is simply a "star" sign. - ? is for expanding to one single character, matched against files in current directory. \? is simply a question mark. - ... and so on... - And carriage-return is for ending the current command-line. \<CR> is simply a carriage-return character, that is a "blank" (or separator) from the shell's point of view. It just means that you're not done with editing the current command-line. Yves. |
To further clarify, pressing \ + <return> makes the shell "escape" thus taking the <return> as a character argument to `cd` and waiting for a <return> to complete the argument list (to cd).
Since it escapes to <return>, the shell assumes that you have finished one line and so displays PS2 (which is Prompt string 2 and is usually set to ">"). So it waiting for command completion. Simply give a <return> and ignore the error (may be something like "^M doesnt exist" ... HTH. End |
Also, windoze command "cmd" is an updated version of COMMAND.com which usually lands up in c:\windows\system or some other dangerous folder whereas `cd` (cd without arguments) in Unixes mean change to your home directory.
End |
For some reason - I thought we were talking about ls.....
What can I say - it was like 2am when I posted :p |
All times are GMT -5. The time now is 06:29 AM. |