LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   chown (https://www.linuxquestions.org/questions/linux-newbie-8/chown-882244/)

brownie_cookie 05-23-2011 07:25 AM

chown
 
Hi all

I've got a question about the command chown...
In the man pages, they say the you need to use the command like this
Code:

# chown user:user /folder
so they say, you need to use the ':'

but i've used '.' like
Code:

# chown user.user /folder
and it also works..

is this normal , or is it something in a config file?
or is it just a coincidence?

Thanks in advance

Brownie :hattip:

sag47 05-23-2011 07:29 AM

Read under the section for Compatibility in the chown man page.

EricTRA 05-23-2011 07:33 AM

Hi Björn,

Or from the info page:
Code:

info coreutils "chown invocation"
Quote:

Some older scripts may still use `.' in place of the `:' separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU `chown' supports
`.' so long as no ambiguity results. New scripts should avoid the use
of `.' because it is not portable, and because it has undesirable
results if the entire OWNER`.'GROUP happens to identify a user whose
name contains `.'.
Kind regards,

Eric

brownie_cookie 05-23-2011 07:34 AM

so i geuss, both are the same and both can be used??
if so, why don't they say that in the man pages of linux?
i mean, when i do
Code:

# man chown
i don't get anything of the '.'

* UPDATE *
but i did the
Code:

# info chown
  Some older scripts may still use `.' in place of the `:' separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU `chown' supports
`.' so long as no ambiguity results.  New scripts should avoid the use
of `.' because it is not portable, and because it has undesirable
results if the entire OWNER`.'GROUP happens to identify a user whose
name contains `.'.

and they say it's better to be avoid..

---------- Post added 05-23-11 at 02:34 PM ----------

Quote:

Originally Posted by EricTRA (Post 4364487)
Hi Björn,

Or from the info page:
Code:

info coreutils "chown invocation"

Kind regards,

Eric

yeah, i've noticed it to :p thanks ;)


All times are GMT -5. The time now is 05:14 PM.