I have a strange issue with the following command:
# chown -R myuser:mygroup * chown: invalid option -- 'i' Try 'chown --help' for more information.
the command is not aliases
# type chown chown is hashed (/bin/chown)
Where I can look further?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
As the glob (pathname) expansion is done first by the shell before the
chown runs, the glob pattern
* is expanded to all files in the current directory first and
chown is getting those as its options and arguments. You have a file in the current directory that starts with
chown is considering it as an option, not as an argument (filename).
You need to use
-- to indicate the end of options for
chown -R myuser:mygroup -- *
Or precede the glob pattern (
./ to explicitly indicate it as argument:
chown -R myuser:mygroup ./*