Previous Section  < Day Day Up >  Next Section

chown—changes owner of file


chown [ –fhR ] owner filename ...


chown changes the owner of the files to owner. The owner may be either a decimal user ID or a login name found in /etc/passwd file. Only the owner of a file (or the superuser) may change the owner of that file.

Example A.11.

1   chown john filex

2   chown -R ellie ellie


EXPLANATION

  1. Changes the user ID of filex to john.

  2. Recursively changes the ownership to ellie for all files in the ellie directory.

    Previous Section  < Day Day Up >  Next Section