file not found error when using folder names with 2 words
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
file not found error when using folder names with 2 words
I have a frustrating problem changing directories or executing commands in a terminal window. I can not use a path when executing a command if a folder name is made up of two seperate words with a space between them. I have to manually use cd to drill down folder by folder. If a folder name is two words, then I have to use the wildcard *. Example: to do 'cd mp3 files', I would have to use 'cd mp*' and my shell path would drill down to mp3 files. If I do not use a wildcard, I would get a file not found error. I am using suse 10.0.
You can get around this in either of at least two ways:
1. Enclose the file/directory name in single or double quotes. THis makes the shell see it as a single argument, instead of multiple arguments.
2. Escape each whitespace character by prefixing it with a '\' backslash character. This tells the shell to not use it as a delimiter between arguments.
--- rod.
I find it good practice to use and underscore "_" instead of spaces but if this is from an existing partition or drive that was setup in windows if you don't want to rename all the directories try this
example from computer
to access
Quote:
/mnt/windows/documents and settings
I have to type
Quote:
cd /mnt/windows/documents\ and\ settings
tab completion works as well, at least it does for me, so most of the time it's just
Ok, I will try those examples. I have a similar problem with crossover office. When I try to open outlook, it can not find the 'welcome.msg' and so it will not run. I could try the '_' underscore between 'program files' in my wine directory?
I could try the '_' underscore between 'program files' in my wine directory?
I think bneal means to use underscores instead of whitespace when creating the file names. You cannot just refer to a file by name, substituting existing whitespace with underscores.
Hope that clarifies things.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.