linux:commande:shell:stat
Table des matières
Connaitre les ACL d'un fichier ou Repertoire
vu depuis terminal:
|-rw-r--r-- 1 httpdusr administ 969 Feb 15 22:03 local.php|
Pour trouver le code ACL afin de pouvoir s'en servir avec la commande chmod taper simplement la commande suivante:
stat -c %a local.php
retour Terminal
644
Obtenir des infos
Pour obtenir plus d'information sur un repertoire ou fichier
Par exemple dernier accès / modification / ES etc ..
stat /root
retourne
Fichier : /root Taille : 4096 Blocs : 8 Blocs d'E/S : 4096 répertoire Périphérique : b302h/45826d Inœud : 16 Liens : 7 Accès : (0700/drwx------) UID : ( 0/ root) GID : ( 0/ root) Accès : 2017-09-07 18:07:31.081454185 +0200 Modif. : 2020-02-14 21:13:28.260775899 +0100 Changt : 2020-02-14 21:13:28.260775899 +0100 Créé : -
très utiles en cas d'audit sur les fichiers ou répertoires
— sylvain 2020/02/15 12:18
linux/commande/shell/stat.txt · Dernière modification : de 127.0.0.1
