Good afternoon,
Sir's, i owuld like to search for some advice, whats the fastest way to change multiple files ownership. For HostnameA will be their basis, for what ever files and permissions that hostnameA has, it should replicate the permissions and ownership to hostname B.
$hostname
hostnameA
$ pwd
/home/tester
$ ls -l
total 112
drwxr--r-- 3 root staff 256 Jan 03 17:18 a
drwxr-xr-x 2 tester staff 256 Jan 16 12:03 aa
-rwxr--r-- 1 tester staff 398 Jan 02 15:10 awksol.sh
$cd aa
/home/tester/aa
total 32
-rw-r--r-- 1 tester staff 189 Jan 16 11:37 a
-rw-r--r-- 1 tester staff 125 Jan 16 12:03 addd
-rw-r--r-- 1 tester staff 186 Jan 16 11:36 b
$hostname
hostnameB
$ pwd
/home/agent
$ ls -l
total 112
drwxr--r-- 3 root staff 256 Jan 03 17:18 a
drwxr-xr-x 2 agent staff 256 Jan 16 12:03 aa
-rwxr--r-- 1 root staff 398 Jan 02 15:10 awksol.sh
-rwxr--r-- 1 root staff 398 Jan 02 15:10 searcher.sh
$cd aa
/home/agent/aa
total 32
-rw-r--r-- 1 root staff 189 Jan 16 11:37 a
-rw-r--r-- 1 root staff 125 Jan 16 12:03 addd
-rw-r--r-- 1 agent staff 186 Jan 16 11:36 b
-rw-r--r-- 1 testing staff 186 Jan 16 11:36 tryout
output :
$hostname
HostnameB
total 112
drwxr--r-- 3 root staff 256 Jan 03 17:18 a
drwxr-xr-x 2 tester staff 256 Jan 16 12:03 aa
-rwxr--r-- 1 tester staff 398 Jan 02 15:10 awksol.sh
$cd aa
/home/tester/aa
total 32
-rw-r--r-- 1 tester staff 189 Jan 16 11:37 a
-rw-r--r-- 1 tester staff 125 Jan 16 12:03 addd
-rw-r--r-- 1 tester staff 186 Jan 16 11:36 b