LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 08-02-2007, 08:45 AM   #1
sirius57
Member
 
Registered: Jun 2004
Distribution: Fedora core 1, puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora
Posts: 462

Rep: Reputation: 30
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.
 
Old 08-02-2007, 09:07 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 08-02-2007, 09:09 AM   #3
bneal
Member
 
Registered: Jun 2007
Location: Oklahoma City, OK
Distribution: RHEL 4; Suse 10.1, 10.2, FC6, Fedora 7
Posts: 57

Rep: Reputation: 15
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
Quote:
cd /mnt/windows/documents(tab)
this auto completes with
Quote:
cd /mnt/windows/documents\ and\ settings
 
Old 08-02-2007, 09:58 AM   #4
sirius57
Member
 
Registered: Jun 2004
Distribution: Fedora core 1, puppy linux, suse 10.0, opensuse 11.3, 12.1, mythdora
Posts: 462

Original Poster
Rep: Reputation: 30
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?
 
Old 08-02-2007, 11:07 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by sirius57
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Konqueror and Square Brackets in Folder/File Names fortezza Linux - Software 2 12-19-2005 10:10 PM
Kget, file or folder not found. mooreted Mandriva 1 03-15-2005 07:49 PM
Spaces in folder/file names ~ termial Garoth Linux - Software 1 11-12-2004 01:56 PM
how to ban certain file or folder names Goma_2 Linux - General 0 06-03-2004 03:54 AM
moving a file to a folder gets error jackstoage Linux - Newbie 3 04-02-2004 10:18 AM


All times are GMT -5. The time now is 11:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration