[CentOS] command line escaping a dash

Craig White craigwhite at azapple.com
Mon Oct 20 15:04:30 UTC 2008


I cannot figure this out...

I would like to change the owner of a bunch of folders whose name begins
with a dash...

# chown Administrator \-BILLED\ JOBS\ -\ 1997-2002 -R
chown: invalid option -- B
Try `chown --help' for more information.

# chown Administrator "\-BILLED\ JOBS\ -\ 1997-2002" -R
chown: cannot access `\\-BILLED\\ JOBS\\ -\\ 1997-2002': No such file or
directory

# chown Administrator "-BILLED JOBS - 1997-2002" -R
chown: invalid option -- B
Try `chown --help' for more information.

# chown Administrator '-BILLED JOBS - 1997-2002' -R
chown: invalid option -- B
Try `chown --help' for more information.

?

Craig



More information about the CentOS mailing list