PDA

View Full Version : How to change directory to the one which has multiple words



scottjsn
22-Sep-2012, 16:39
How to change directory to the one which has multiple words separated by space(s) in it such as A- Test and This Is A Directory?

I tried:
cd /reference/A - Test/subFolder/This Is Another Folder

It appeared to me that the Linux does not recognize the separate the words in a subdirectory.





Thanks


Scott

malcolmlewis
22-Sep-2012, 17:02
How to change directory to the one which has multiple words separated by
space(s) in it such as* A- Test* and* This Is A Directory*?

I tried:
cd /reference/A - Test/subFolder/This Is Another Folder

It appeared to me that the Linux does not recognize the separate the
words in a subdirectory.





Thanks


Scott



Hi
A forward slash eg;


cd ~/Local\ Mail
cd ~/Local\:Mail
cd ~/Local\@Mail


--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 11:55, 4 users, load average: 0.00, 0.04, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

ab
23-Sep-2012, 04:57
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> A forward slash eg;

Well, actually that's a backslash. Slashes (sometimes redundantly
called forward slashes) are the other way and delimit directories as you
know, and make sideways emoticons.

You could also quote the entire path:

cd '/path/with spaces/goes here/'

or most of it if you want to use special chars like the tilde:

cd ~/'Local Mail'

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQXoi7AAoJEF+XTK08PnB5HDYP/0Y9pbchDpxsb9e/4IRwjsCV
K8mhGXbwq6P8qsEF1EQVX9IR3wW0Hzx5BggessqlCvZYAlWbOB 8LyMdVQnB3jKkR
4muu8GVopjStiNXw5eZKQU1bOEgkfszGklvqd1TcTv6/2DVxNN6yQnBeaFaf3VSy
vuFGCfsxHaldsT0NzA8uAQyt9ios/0pQIxM4DXQoQwwZpc1rwBoI9gdCaXNvLIlG
EZkVnv0OB179+scSHn+cQvY+G5bibjCJ/Qct4F7THfLZrqf0B8ZhJQg/tm2KBEfr
vUZXPq/BDOkJU+AmBYsdauP7uOhvwcLX3mxYwq4omgS7j/nPkZUzUg5n1qmmsZFO
h1kH/IB3+fzVUBdR0M1eyGSLrZn1yNIDIToNSlu/kvOLKjb5dU6NlFKgaGuiaOo9
JEqzQHlBz1rn5eiXcqHegp1lwt/tPxNS3uisHtdrsIaLDkntqauqyyUR9vjmvSrw
1l3NE+YoNo+5NgPbMn5pf4Z1r/gmE8BSKpGcxFUOywOjcdAewwfHcLqNLx7DinAj
x1cThg1mZm4N4QEYz8QshGjx5UDH692DS81ecHk4zFVLl1ThfJ XWrkMFB/TaPcjl
OeiGygCkJteGdAb1JxQqdC+iKDFXzEgoeDhitDrIY+SIgUOTME BVwl8dri4OA8X7
AMLe+AypdY4CtI7SVKnS
=3JL/
-----END PGP SIGNATURE-----

malcolmlewis
23-Sep-2012, 05:32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> A forward slash eg;

Well, actually that's a backslash. Slashes (sometimes redundantly
called forward slashes) are the other way and delimit directories as you
know, and make sideways emoticons.

You could also quote the entire path:

cd '/path/with spaces/goes here/'

or most of it if you want to use special chars like the tilde:

cd ~/'Local Mail'

Good luck.

Hi ab
pedant ;) I just use tab completion these days...does it all for you...

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 10:36, 3 users, load average: 0.08, 0.03, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

ab
23-Sep-2012, 19:52
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> pedant ;) I just use tab completion these days...does it all for
> you...

Yes, I am, and yes, it does. Long live the [Tab] key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQX1qIAAoJEF+XTK08PnB5InQP/ifRztarQL0Q1ZWZ1Pah6g4P
3GRhRBrlUT9b9eChEWnGA49X+aso3+sslAaITjShJJkzM9UsLG Ey3jTwQLTROR/j
1oApm1CVcXwupBL9phayoEDF608g+xFbK8eGLCkS/C947V2mdP5buXYYhjjzT7NC
VDuQ7EEzlEqH7tB2NyISR+MthbGLnVr6TI0wEn7YFArfCl540e P7t53Uc8c9W40H
TUp7ZaKQSgp3BzvnU7hB3i+AgDYDAwc2meC2oXqBtE5PPPSP9J aNzSmGg63qsS2a
CaA7LXaaSF96DES+gOKnRygRRmtqDkfB3Qsnsdmn2YdFm5DbaJ MbZBzkw3JGNB69
NfuZEwkHSGYr3nJNEEeOzZdd0iVGM9TjMuWJDc1uvb0pj+ljyp vwKIWm60x0OkWa
WhAsIUUigWFmDeu+wHD/VlBZr1ETcF1xrUxIiHrNvKHH13Mo6A2t2mL385PGte+R
74qVN32owy6p5MPG4WHB0JyC0/2inN4hS43h53KcM19DHWHfJyCWT2g6Y4QCceUi
3A0s6XgSAfD0J6nJlVL59H1QqWSrK/NAn0mieuVNVvxVU5xAx7VcBjfh2Kb9a4B6
2szJSjmQ0KpIZE0Fpmp9f0KE0mcATG+aGpNyE2wH8AqyM9XYn/lhgB3QOe4CfKMS
MTKQY+ie9V9ZI7TgDQhw
=SXp6
-----END PGP SIGNATURE-----

Magic31
02-Oct-2012, 15:44
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yes, I am, and yes, it does. Long live the [Tab] key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQX1qIAAoJEF+XTK08PnB5InQP/ifRztarQL0Q1ZWZ1Pah6g4P
3GRhRBrlUT9b9eChEWnGA49X+aso3+sslAaITjShJJkzM9UsLG Ey3jTwQLTROR/j
1oApm1CVcXwupBL9phayoEDF608g+xFbK8eGLCkS/C947V2mdP5buXYYhjjzT7NC
VDuQ7EEzlEqH7tB2NyISR+MthbGLnVr6TI0wEn7YFArfCl540e P7t53Uc8c9W40H
TUp7ZaKQSgp3BzvnU7hB3i+AgDYDAwc2meC2oXqBtE5PPPSP9J aNzSmGg63qsS2a
CaA7LXaaSF96DES+gOKnRygRRmtqDkfB3Qsnsdmn2YdFm5DbaJ MbZBzkw3JGNB69
NfuZEwkHSGYr3nJNEEeOzZdd0iVGM9TjMuWJDc1uvb0pj+ljyp vwKIWm60x0OkWa
WhAsIUUigWFmDeu+wHD/VlBZr1ETcF1xrUxIiHrNvKHH13Mo6A2t2mL385PGte+R
74qVN32owy6p5MPG4WHB0JyC0/2inN4hS43h53KcM19DHWHfJyCWT2g6Y4QCceUi
3A0s6XgSAfD0J6nJlVL59H1QqWSrK/NAn0mieuVNVvxVU5xAx7VcBjfh2Kb9a4B6
2szJSjmQ0KpIZE0Fpmp9f0KE0mcATG+aGpNyE2wH8AqyM9XYn/lhgB3QOe4CfKMS
MTKQY+ie9V9ZI7TgDQhw
=SXp6
-----END PGP SIGNATURE-----

What? Did you say something.... there is all this gibberish on my screen? ;)

And I'm just realizing... you probably don't even see it quoted in my reply! Ha!