Solved

Long Directory Name

Posted on 2000-04-19
6
223 Views
Last Modified: 2012-05-04
Hello, currently I am using Window 98 and Redhat Linux 6.1. I got a problem, that is: I mount my hda1 (windows partition) and "use" it from linux. Seem that I can't access to windows c:\program files (because of blank between program and files !!), What should I do if I want to access into this directory ???
0
Comment
Question by:ahchong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Accepted Solution

by:
R_Walsdorf earned 10 total points
ID: 2731939

I know (offhand) 4 Solutions to this problem:
- Use " ",  ex.: cd "Program Files".
- Instead of " " use "\ " which makes it possible
   to use spaces and other "special" chars.
- Use the tab key to fill up the    
   missing/problematic chars (works with bash,
   and add's the "\" where necessary    
   automatically). This will only work when the
   enough of the filename is known to "guess"    
   correct.  
- Use Midnight Commander (if installed you can  
   start the program with "mc")

0
 
LVL 3

Expert Comment

by:DVB
ID: 2731970
Lets say your windows partition is mounted on /win. Then cd "/win/program files" to cd to that directory. Else try using auto completion, just press the tab key to complete the filename.
Do:$cd /w <TAB>
Get:$cd /win
Do:$cd /win/pr <TAB>
Get:$cd "/win1/program files"
This works.
0
 

Expert Comment

by:ibishop
ID: 2732792
The "easy way" is to use the format that MICROS~1 themselves have pioneered - take the first 6 letters of the directory, then add ~1

The only time this sometimes has problems is when you have multiple directories with the same 1st 6 characters (usually in Program Files when you have lots of MS apps installed - you'll see MICROS~1,~2,~3,~4, etc.)

However, for the typical stuff, just something like :

cd /dosmnt/Progra~1

will do the trick for you.

Ian
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:fremsley
ID: 2733632
ibishop: the short aliases are not available when the partition is mounted as 'vfat', you would have to mount it as 'msdos'.
0
 
LVL 3

Expert Comment

by:DVB
ID: 2735459
Huh, my answer went missing??
Anyways, to repeat:
Use quotes
Assume that thw windows partition s mounted on /win.
cd "/win/Program files/"
I would recommend that you use auto completion, by just pressing the tab key.
Type in the minimum number of characters to uniquely identify the file, and press the tab key. It autoinserts quotes where necessary.
0
 
LVL 3

Expert Comment

by:DVB
ID: 2735469
Ignore the second post. That will teach me not to use kfm!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question