LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-23-2020, 01:03 AM   #1
SnowArch
Member
 
Registered: Jan 2020
Distribution: Ubuntu 16.04, umix 20.04.1, Void
Posts: 83

Rep: Reputation: Disabled
Can't cd into directory with a space


Tried ~/VirtualBox\ VMs

Says no directoey found. How do i cd into it?
 
Old 02-23-2020, 01:13 AM   #2
cordx
Member
 
Registered: Oct 2018
Location: texas
Distribution: bodhi 5.1.0
Posts: 797

Rep: Reputation: 184Reputation: 184
you can try with "VirtualBox VMs" in quotes.
 
1 members found this post helpful.
Old 02-23-2020, 01:20 AM   #3
SnowArch
Member
 
Registered: Jan 2020
Distribution: Ubuntu 16.04, umix 20.04.1, Void
Posts: 83

Original Poster
Rep: Reputation: Disabled
worked like a charm. i had the "~/" included in the quotes by mistake
 
1 members found this post helpful.
Old 02-23-2020, 01:35 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Don't (ever) use the space char in file and dir names - try something like "_" instead. Will save a heap of grief.
 
Old 02-23-2020, 10:42 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
What syg00 said X 1000 !

Although spaces are legal in filenames (inc dirs), the default assumption in *nix is that args/params to a cmd are whitespace separated, so don't do that...
Your future self will thank you later, I promise.
 
Old 02-24-2020, 05:53 AM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,824
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
I'm with syg00. I skip them both, and don't capitalize first letters unless I want them sorted first in directory listings, e.g.: virtualBoxVMs. I find whitespace in filenames totally unnecessary, besides highly annoying at a shell prompt, as with Foo listed before bar, and "_" a PITA to type.
 
  


Reply

Tags
command line, filesystems



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] Move file names with space to other directory with different file name with space pradeepdee6 Linux - Newbie 9 08-08-2012 09:19 AM
CentOS Directory server - Can Windows machine be added into directory server manya Linux - Server 3 01-19-2012 03:48 PM
Division of Logical Memory Space in to User Space and Kernel Space shreshtha Linux - Newbie 2 01-14-2010 09:59 AM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
change into directory with space in it? sideveloper Linux - Newbie 3 03-06-2004 04:18 PM

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

All times are GMT -5. The time now is 04:20 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