find

find <chemin> <options>

Par type

-type f

f = fichiers d = dossiers l = liens

Par nom

-name ".htaccess"

Par taille

-size +4G

Par permission

-perm xyz
-perm -u+rw,g+r,o+r

Par attribut

Création :

-ctime +x

Modification :

-mtime -x

Accès :

-atime -x

Sortie dans fichier :

find ./ -type f -printf ./result.txt "%p\ %s\\n"

%p : nom de fichier, %s : taille du fichier, Liste complète : http://linux.about.com/od/commands/l/blcmdl1_find.htm

Jouer avec les résultats :

find -type f -name "*.log" | xargs ls -l
find -type f -name "*.log" -exec ls -l {} \;
  • system/linux/find.txt
  • Dernière modification: 2023/08/05 16:22
  • (modification externe)