
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Representing a Space in a Path
On Wed, Jan 14, 2015 at 12:33:47PM +0900, CL wrote:
> There is probably a simple answer to this, but I am not finding it in my
> Unix User's Guide:
>
> How do you represent a space in a pathname?
>
> Explanation:
>
> When I installed VirtualBox, it created a directory in /home/<username>
> called "VirtualBox VMs" and located the *.vdi files and the guest setup
> file directories beneath it. The *.vdi files and guest directories also
> have spaces in their names. When I attempt:
>
> > # cd /home/<username>/VirtualBox VMs/
Escape it with a backslash. My CentOS-6.6 (and FreeBSD.10-1 will do this if
I use tab completion. I go ls Virtua (and hit tab) and get
ls VirtualBox\ VMs/
See if the backslash works. Otherwise, try quoting it. All untested by me
But usually with a VBoxManage command, you don't even need the path just
the filename, Again, untested but I believe you can do
VBoxManage modifyhd WIN7x664.vdi (and maybe not even use the .vdi part)
(Or just cd into the directory and run the command there. :) )
>
>
> > #:~$ VBoxManage modifyhd --resize 185040 /home/<username>/VirtualBox
> > VMs/WIN7x64.vdi
> > Oracle VM VirtualBox Command Line Management Interface Version 4.3.20
> > (C) 2005-2014 Oracle Corporation
> > All rights reserved.
> >
> > Usage:
> >
> > VBoxManage modifyhd <uuid|filename>
> > [--type
> > normal|writethrough|immutable|shareable|
> > readonly|multiattach]
> > [--autoreset on|off]
> > [--property <name=[value]>]
> > [--compact]
> > [--resize <megabytes>|--resizebyte <bytes>]
> >
> >
> > Syntax error: Invalid parameter 'VMs/WIN7x64.vdi'
> Which means that modifyhd is attacking the address from the other side
> of the space and also is not understanding my instruction.
>
> What to I type in in place of the space(s) to complete the address so
> that it is understood?
To answer that part of the question, a path is escaped with a backslash.
>
--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
Home |
Main Index |
Thread Index