On Mon, 2008-10-20 at 08:04 -0700, 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...
# 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.
In most cases, putting a single '-' signals the last "flag" and says anything thereafter is a "normal" argument. Give it a try like this. I'm not sure though.
chown Administrator - "-BILLED JOBS - 1997-2002" -R
I'm unsure of the "-R". If a "flag, move it ahead of the '-'.
?
Craig
<snip sig stuff>
HTH