LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 07: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, 07:32 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
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, 01: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-25-2010 11:24 PM
A4Tech X-718 navigation buttons problem Baisuoklis Linux - Hardware 2 01-12-2009 12:25 AM
navigation of browser munna_dude Linux - Networking 2 02-10-2007 05: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 03:21 PM
Navigation .. winsnomore LQ Suggestions & Feedback 0 11-16-2004 03:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:51 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
Open Source Consulting | Domain Registration