LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-04-2011, 04:34 AM   #1
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Rep: Reputation: 1
How to move-in directory having two words using cd command?


How can i change to a directory which is having two words : "Program Files"

When i tyep "cd Program Files", it says no files name found where actually there is a folder for name Program Files.
 
Old 11-04-2011, 04:42 AM   #2
smilesavvy
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
Use below command , it works.
Code:
cd "Program Files"
--Ramesh Jonathan
 
1 members found this post helpful.
Old 11-04-2011, 04:46 AM   #3
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Original Poster
Rep: Reputation: 1
Great!!! Thanks, appreciate that.
 
Old 11-04-2011, 05:00 AM   #4
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 731

Rep: Reputation: 158Reputation: 158
Or escape the spaces (put a backslash character before the space):

Code:
cd Program\ Files
 
1 members found this post helpful.
Old 11-04-2011, 07:45 AM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
It's vital to understand how the shell handles arguments and whitespace. Read through these three links:

http://mywiki.wooledge.org/Arguments
http://mywiki.wooledge.org/WordSplitting
http://mywiki.wooledge.org/Quotes

Also, take advantage of tab completion. If you type part of the name then hit <tab>, the shell will attempt to complete the line with a matching filename from the current directory. If it does match something, the inserted name will be properly escaped for you.
 
1 members found this post helpful.
  


Reply



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
How To Remove Words/Text In A Directory? prayingtosky Linux - Newbie 14 02-25-2011 03:08 PM
terminal command to move a file to another directory vipjag2 Linux - Newbie 7 05-11-2009 10:37 PM
cannot using FTP move command to move files adrianmak Linux - Networking 4 04-21-2009 12:01 PM
Move file and change directory in one command Ztyx Linux - General 8 02-19-2009 04:09 AM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:21 AM.

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