pulisci
Il NFS di XCP chown
il comando scansiona e modifica la proprietà di tutti i file per la struttura di directory specificata. Il chown
Il comando richiede una condivisione NFS o il percorso POSIX come variabile. XCP chown modifica ricorsivamente la proprietà per un dato percorso. Il chown
Comando Visualizza l'ID utente modificato (UID) per un file.
xcp chown -user/-group <user-name/group-name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -user user2 -v 101.101.10.110:/s_v1/smaple_set/D1 Sat Apr 2 23:06:05 2022 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1 from 1001:0 to 1004:0 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1/1.txt from 1001:0 to 1004:0 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1/softlink_1.img from 1001:0 to 1004:0 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1/1.img from 1001:0 to 1004:0 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1/hardlink_1.img from 1001:0 to 1004:0 changed ownership of 101.101.10.110:/s_v1/smaple_set/D1/softlink_to_hardlink_1.img from 1001:0 to 1004:0 Xcp command : xcp chown -user user2 -v 101.101.10.110:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (1.82 KiB/s), 1.11 KiB out (923/s) Total Time : 1s. STATUS : PASSED [root@user-1 linux]#
La seguente tabella elenca chown
parametri e loro descrizione.
Parametro | Descrizione |
---|---|
Esclude i file e le directory corrispondenti al filtro. |
|
Elabora solo i file e le directory corrispondenti al filtro. |
|
Imposta l'ID del gruppo Linux (GID) all'origine. |
|
Imposta l'UID Linux all'origine. |
|
Modifica l'UID. |
|
Modifica il GID. |
|
Specifica il file referenziato o il punto di directory. |
|
Riporta l'output per ogni oggetto elaborato. |
chown -exclude <filter>
Utilizzare -exclude <filter>
con il chown
comando per escludere i file e le directory che corrispondono al filtro.
xcp chown -exclude <filter> -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -exclude "fnm('1.img')" -user user2 101.101.10.210:/s_v1/smaple_set/D1 Excluded: 1 excluded, 0 did not match exclude criteria Xcp command : xcp chown -exclude fnm('1.img') -user user2101.101.10.210:/s_v1/smaple_set/D1 Stats : 5 scanned, 1 excluded, 5 changed ownership Speed : 2.10 KiB in (1.75 KiB/s), 976 out (812/s) Total Time : 1s. STATUS : PASSED [root@user-1 linux]#
chown -match <filter>
Utilizzare -match <filter>
con il chown
comando per elaborare solo i file e le directory che corrispondono al filtro.
xcp chown -match <filter> -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -exclude "fnm('1.img')" -user user2 101.101.10.210:/s_v1/smaple_set/D1 Excluded: 1 excluded, 0 did not match exclude criteria Xcp command : xcp chown -exclude fnm('1.img') -user user2101.101.10.210:/s_v1/smaple_set/D1 Stats : 5 scanned, 1 excluded, 5 changed ownership Speed : 2.10 KiB in (1.75 KiB/s), 976 out (812/s) Total Time : 1s. STATUS : PASSED [root@user-1 linux]#
chown -group <group>
Utilizzare -group <group>
con il chown
Per impostare il GID di Linux all'origine.
xcp chown -match <filter> -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -group group1 101.101.10.210:/s_v1/smaple_set/D1 Xcp command : xcp chown -group group1 101.101.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (1.92 KiB/s), 1.11 KiB out (974/s) Total Time : 1s. STATUS : PASSED [root@user-1 linux]#
chown -user <user>
Utilizzare -user <user>
con il chown
Per impostare Linux UID al sorgente.
xcp chown -user -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -user user1 102.101.10.210:/s_v1/smaple_set/D1 Xcp command : xcp chown -user user1 102.101.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (3.12 KiB/s), 1.11 KiB out (1.55 KiB/s) Total Time : 0s. STATUS : PASSED [root@user-1 linux]#
chown -user-da <user_from>
Utilizzare -user-from <user_from>
con il chown
Per modificare l'UID.
xcp chown -user-from user1 -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -user-from user1 -user user2 101.101.10.210:/s_v1/smaple_set/D1 Xcp command : xcp chown -user-from user1 -user user2 102.108.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (2.44 KiB/s), 1.11 KiB out (1.21 KiB/s) Total Time : 0s. STATUS : PASSED [root@user-1 linux]#
chown -gruppo-da <group_from>
Utilizzare -group-from <group_from>
con il chown
Per modificare il GID.
xcp chown -group-from <group_name> -group <group_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -group-from group1 -group group2 101.101.10.210:/s_v1/smaple_set/D1 Xcp command : xcp chown -group-from group1 -group group2 101.101.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (4.99 KiB/s), 1.11 KiB out (2.47 KiB/s) Total Time : 0s. STATUS : PASSED [root@user-1 linux]#
chown -reference <reference>
Utilizzare -reference <reference>
con il chown
comando per specificare il file referenziato o il punto di directory.
xcp chown -reference <reference> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -reference 101.101.10.210:/s_v1/smaple_set/D2/2.img 101.101.10.210:/s_v1/smaple_set/D1 Xcp command : xcp chown -reference 101.101.10.210:/s_v1/smaple_set/D2/2.img 101.101.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 3.11 KiB in (6.25 KiB/s), 2.01 KiB out (4.05 KiB/s) Total Time : 0s. STATUS : PASSED [root@user-1 linux]#
chown -v
Utilizzare -v
con il chown
comando per riportare l'output per ogni oggetto elaborato.
xcp chown -user-from <user_name> -v -user <user_name> <source NFS export path>
Mostra esempio
[root@user-1 linux]# ./xcp chown -user-from user2 -v -user user1 101.101.10.210:/s_v1/smaple_set/D1 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1 from 1004:1003 to 1001:1003 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1/1.img from 1004:1003 to 1001:1003 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1/1.txt from 1004:1003 to 1001:1003 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1/softlink_1.img from 1004:1003 to 1001:1003 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1/softlink_to_hardlink_1.img from 1004:1003 to 1001:1003 changed ownership of 101.101.10.210:/s_v1/smaple_set/D1/hardlink_1.img from 1004:1003 to 1001:1003 Xcp command : xcp chown -user-from user2 -v -user user1 101.101.10.210:/s_v1/smaple_set/D1 Stats : 6 scanned, 6 changed ownership Speed : 2.25 KiB in (2.02 KiB/s), 1.11 KiB out (1.00 KiB/s) Total Time : 1s. STATUS : PASSED [root@user-1]