Online Linux Terminal Logo
OnlineLinuxTerminal
Opérations sur les fichiersCLI Manual

$find

Rechercher des fichiers et des répertoires dans une arborescence selon le nom, le type, la taille ou la date.

Syntaxe de la commandePOSIX Standard
find [PATH] [OPTIONS] [EXPRESSION]
Communauté Linux2.4k En ligne

Échangez avec des utilisateurs Linux, apprenez des commandes et téléchargez des PDF.

Essayer en direct dans le bac à sable interactif

Simulation côté client sans installation avec retour instantané.

Ouvrir dans le terminal plein écran ↗
bash — terminal

Aperçu et fonctionnement

La commande find est l'un des utilitaires les plus puissants de Linux pour rechercher récursivement des fichiers en temps réel.

Options et drapeaux courants

Flag / OptionDescription
-name [pattern]Search for files matching the specified filename or wildcard pattern (case-sensitive).
-iname [pattern]Search for files matching the pattern ignoring case distinctions.
-type [f|d|l]Filter results by file type: f (regular file), d (directory), l (symbolic link).
-size [+|-][n]Search by file size: +10M (larger than 10MB), -1k (smaller than 1KB).
-mtime [n]Find files modified n*24 hours ago (+7 for older than a week, -1 for last 24h).
-exec [cmd] {} \;Execute a specific shell command on each matching file found.

Exemples pratiques du monde réel

#1Find files by exact name or extension
find /var/log -name "*.log"

Recursively scans the /var/log directory for all files ending with the .log extension.

#2Find all directories in the home folder
find /home/user -type d

Filters and outputs only directory paths inside the user home folder.

#3Find files modified in the last 24 hours
find . -type f -mtime -1

Locates recently created or modified files in the current working directory.