Skip to content

Instantly share code, notes, and snippets.

@abarhub
Created July 19, 2025 06:43
Show Gist options
  • Select an option

  • Save abarhub/fd01dc948ec1896aab79b0a4cfb2337c to your computer and use it in GitHub Desktop.

Select an option

Save abarhub/fd01dc948ec1896aab79b0a4cfb2337c to your computer and use it in GitHub Desktop.
Commande find

La commande find

find . -name "main.c" -print

les parametres de recherche :

  • -name XXX : le nom du fichier recherche
  • -path XXX : recherche sur le chemin complet c-a-d le nom du fichier et le répertoire
  • -maxdepth n: rechercher sur une profondeur maximale de n

les parametres action :

  • -print : affiche le résultat. si aucune action n'est renseigné
  • -exec XXX : execute la commande sur chaque fichier retrouvé, le parametre est {}. par exemple : find /home/debianos -user debianos -type f -exec ls -l {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment