Solved

Long Directory Name

Posted on 2000-04-19
6
202 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
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS- KeepAlived notify script not working 23 44
nagios monitor 3 44
nagios remote hosts 9 46
Python variable _ manually assigned 9 65
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now