chown --reference=template.txt report.pdf

Category: Administration

chown --reference=template.txt report.pdf

Copy ownership from a reference file

The --reference form copies the user and group of template.txt onto report.pdf instead of typing a user:group pair. This is handy when a file was restored or extracted with the wrong owner. The same reference trick exists in chmod --reference for permissions.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.