Red Hat Linux 9 Professional Secrets [Electronic resources]

Naba Barkakati

نسخه متنی -صفحه : 341/ 200
نمايش فراداده

chown

Purpose

Change the user and group ownership of a file.

Syntax

chown [cvfR]

username

.

groupname files

Options

-c lists only files whose ownership have changed.

-f stops any error message displays.

-v verbosely displays ownership changes.

-R recursively changes the ownership of files in all subdirectories.

Description

To make a user the owner of one or more files, invoke

chown with the user name followed by the filenames. To change the group ownership as well, append the new group name to the user name with a period as separator. For example, to make user

naba the owner of all files in a directory, type chown naba *. To change both the owner and group to naba, type chown naba.naba *. Note that you have to be logged in as

root to change the ownership of files.