Re: command line escaping a dash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 2008-10-20 at 16:09 +0100, Hakan Koseoglu wrote:
> Hi Craig,
> 
> Craig White wrote:
> > I cannot figure this out...
> > 
> > I would like to change the owner of a bunch of folders whose name begins
> > with a dash...
> 
> When you are using shell commands, if you use double-dash, you don't 
> need to escape it.
> 
> [root@red ~]# mkdir -- "-test"
> [root@red ~]# chown oracle -- -test
> [root@red ~]# ls -ld -- -test
> drwxr-xr-x  2 oracle root 4096 Oct 20 16:01 -test
> 
> -- stops the commands continuing the parsing the parameters as options.
----
I may have known that somewhere in the recesses of my mind

Thanks - solved

Craig

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux