I have a tar archive containing two owners, 1000 and 0 :
$ tar tfvz archive.tgz drwxr-xr-x 1000/1000 main/ drwxr-xr-x 0/0 main/root_dir/ drwxr-xr-x 0/0 main/root_dir/home/ -rw-r--r-- 1000/1000 main/root_dir/home/file
Is there a simple way to change ownership only on directories/files with owner 1000 ? Those with owner 0 must stay unchanged.
I didn't find any options in tar or find that select a specific owner, for example
tar --no-same-owner change all owners, not only owner 1000 (I extract archive with
sudo tar xfz archive.tgz to allow creation of root (0) directories/files).