Using chown recursively with a reference file

Nothing too complicated 😉

-R > recursive (includes all folders/files)
–reference=. > get owner:group from the current folder (eg: single dot)
. > start in current directory

chown -R --reference=. .

This comes in pretty handy when migrating sites using gzipped archives 😀

Leave a Reply

Your email address will not be published. Required fields are marked *