Bash dosent allow to enter Program files Directory

  • viji19812001
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Dec 23, 2008
  • Posts: 10
  • Status: Offline

Post December 30th, 2008, 9:14 pm

Hi,

The Problem is only with bash prompt.
When I go to c: and do an ls it lists program files under it.
but when I do cd Program files or cd Program~
it throws an error no such file or directory.
It doesn't recognise or allow me to enter the folder....

In case its a space problem how do I give the cd command to get into the folder.
Please suggest me.

Regards,
vijaya.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 30th, 2008, 9:14 pm

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 6128
  • Loc: Seattle, WA
  • Status: Offline

Post December 30th, 2008, 9:26 pm

I believe joebert mentioned this in another topic of yours; I hope you took the time to read it.

Surround the directory name in double quotes:
Quote:
cd "Program Files"
The Beer Monocle. Classy.
  • VideoRipper
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 03, 2008
  • Posts: 15
  • Status: Offline

Post December 31st, 2008, 1:41 am

...Or use its DOS-8.3 name:
Code: [ Select ]
 
cd progra~1
  1.  
  2. cd progra~1

(so without the m in program)

Another thing you could have (XP with very strict rules or Vista)
is that you don't have access rights to that folder.
(Just a wild guess...)

Greetz,

Peter.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post December 31st, 2008, 3:02 am

Does Windows even have a "bash" prompt ?
I thought it was the "Command Prompt" or "DOS Box" on Windows.

Now I'm just confused. :scratchhead:
Strong with this one, the sudo is.
  • grinch2171
  • Moderator
  • Genius
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 6737
  • Loc: Martinsburg, WV
  • Status: Offline

Post December 31st, 2008, 6:29 am

Apparently there is bash for Windows. But honestly, if you want to run unix commands why don't you just install Linux. Trying to get unix programs to run on Windows sounds about as fun as pissing into a strong wind.
‎"Be polite, be professional, but have a plan to kill everybody you meet." Maj. Gen. James Mattis
  • viji19812001
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Dec 23, 2008
  • Posts: 10
  • Status: Offline

Post January 1st, 2009, 7:57 pm

Hi,

Its not that I need to use bash in windows or Iam forcing myself to use windows. Its a sequence of installation steps which I have to run in windows environment.

They need me to run a file bash.exe which takes me to a bash prompt.

In the bash prompt i need to give make command
From here it directly searches for few files in program files directory So I have no control to specify "Program Files" or Program~1 ,It just directly searches and throws an error "Program Files" no such file or directory.

Also If I try to list cd Program~1 it dosent work.
Could it be a permission problem like what one of them mentioend.
Please let me know.
  • filth
  • Born
  • Born
  • No Avatar
  • Joined: Feb 09, 2009
  • Posts: 1
  • Status: Offline

Post February 9th, 2009, 10:59 am

It sounds like you're installing something like the openSSH server on Windows, or something else involving Cygwin which has Linux-oriented instructions with it. If that's the case, I'd try something like copSSH instead which has a much nicer installer than anything Cygwin-based.

Anyway, onto your question. Your options are as outlined already:

1. cd progra~1
2. cd "program files"

You can also try tab-completion, which is supported by any recent OS version (NT5 and above):

3. cd p [and then press Tab]

Tab-completion will ensure that Windows expands the folder name into one suitable for it. As a final option, you can write a batch script to cd into the folder for you, and test it locally, in case it's a problem with how your're connecting to the Windows command line. Then you would only have to do this:

4. C:/batch.bat [assuming your file was saved to the root of C: and named "batch.bat"]. It would simply contain the text as in option 2, or even the full path to your target directory if you want, that would make it so much quicker.

Incidentally, if it is SSH via Cygwin, take my advice and install copSSH. If you do, though, you'll be greeted with a bash prompt when logging in. Simply type "cmd" (without the quotes) to drop to the Windows command line, and then "exit" (again, without the quotes) to move back to the bash prompt. Good luck!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 8921
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Post February 9th, 2009, 2:16 pm

You could also type:

dir

to see what files/directories show up. Maybe you could then at least see if the program files directory is listed.
Ozzu Hosting - Want your website on a fast server like Ozzu?

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.