566 tutoriels disponibles
Chercher un tutoriel
Bienvenue
sur Shareannonce
 
Shell command to find and exec
Ecrit par: Shareannonce
Date création:  10-04-2022
Nombre de vues:  868
Catégorie:  informatique > developpement > linux
Note: 
 
   Tutoriel N° 2f2

shell command to find and exec


1- Find all png and cp them in /home/shareannonce/toto/ folder

find /home/shareannonce -type f -name "*.png" -exec cp "{}" /home/shareannonce/toto/ \;


2- Effacer récursivement

find /home/ -name base.php -exec rm -f {} ;

find /home/shareannonce/ -name '._*' -exec rm -f {} ;

find /home/shareannonce/ -type f -exec du -sh {} ;


source:

https://www.howtouselinux.com/post/linux-find-exec-examples-advanced-part#:~:text=Find%20exec%20causes%20find%20command,print%20files%20with%20certain%20content.


 
 
   Autres tutoriels de la même catégorie >
 
ShareAnnonce version 2.0 Tous droits reserves. | Condition d'utilisation | Contact