LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2012, 08:21 AM   #1
Oxyster
LQ Newbie
 
Registered: Sep 2012
Posts: 1

Rep: Reputation: Disabled
Smile terminal navigation problem


Hi. I'm fairly new to using the terminal, being mainly an xp user. I decided to make the move over the linux and run all my necessary windows apps through wine a few months ago. I have got to say I love Linux.

I have a basic understanding of the terminal but when I try to access my 'Drive_c/Program files (x86)' I recieve the following error

bash: syntax error near unexpected token `('

I have no problem using Dolphin to access the files but I really want to get to grips with the terminal a bit more.

Thanks.
 
Old 09-23-2012, 08:32 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Hi and welcome to LQ.

It's because Linux does not usually allow a blank space in file/directory names. That's not a problem though. You just need to 'escape' it. Please type:
Code:
cd Prog[Tab]\[space][tab]\[space][tab]
 
Old 09-23-2012, 02:00 PM   #3
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 55
In fact, it's not Linux's fault, it's bash. Bash uses whitespace characters (space, tab, newline) to seperate "words" and some special characters for special cases (eg parenthesis for expression evaluation order). Filenames can have such characters, but in order to access those files you need to escape those characters, as suggested by sycamorex. In bash the escape character is \ so in your case it would be:
Code:
Drive_c/Program\ files\ \(x86\)
Notice the \ escape character before every "special" character. Another alternative would be to double-quote the whole path:
Code:
$ cd "Drive_c/Program files (x86)"
 
  


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
[SOLVED] Navigation in 'less' not working czerwinski1977 Linux - General 5 10-26-2010 12:24 AM
A4Tech X-718 navigation buttons problem Baisuoklis Linux - Hardware 2 01-12-2009 01:25 AM
navigation of browser munna_dude Linux - Networking 2 02-10-2007 06:02 AM
LXer: Open Source presence at Institute of Navigation's Global Navigation Satellite Systems meeting in Fort Worth, TX next week LXer Syndicated Linux News 0 09-20-2006 04:21 PM
Navigation .. winsnomore LQ Suggestions & Feedback 0 11-16-2004 04:10 PM


All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration