rename directory that has leading - in name

Michael Hirsch mdhirsch at gmail.com
Sun Aug 17 05:57:16 UTC 2008


On Sat, Aug 16, 2008 at 11:43 PM, chuck adams <k7qo at commspeed.net> wrote:
>
> in bash:
>
> how do you escape the - if it is the leading character in a file
> or directory name.

Use the "--" switch than means it is the last switch:
mv -- -name newname

It also works for rm, touch, etc.

Michael




More information about the kubuntu-users mailing list