Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format
PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
doc:systeme:find [27/12/2012 07:59] smolski [Quelques options] |
doc:systeme:find [26/08/2013 12:01] smolski [Effacer le contenu d'un fichiers] |
||
---|---|---|---|
Ligne 522: | Ligne 522: | ||
//Merci à //**adrien**// sur le chan //#slackware-fr// et au //**captnfab**// not' matelot hottentot favori !// :-) | //Merci à //**adrien**// sur le chan //#slackware-fr// et au //**captnfab**// not' matelot hottentot favori !// :-) | ||
- | ===== Effacer le contenu d'un fichiers ===== | + | ==== Effacer le contenu d'un fichiers ==== |
- | Pour effacer le contenu d'un fichier : | + | Pour effacer le contenu d'un fichier |
+ | |||
+ | === le chevron === | ||
+ | |||
+ | Avec [[commande:chevron|la commande chevron]] | ||
<code bash> | <code bash> | ||
find -type f -iname nom_du_fichier -execdir cat {} nom_du_fichier + > nom_du_fichier \;</code> | find -type f -iname nom_du_fichier -execdir cat {} nom_du_fichier + > nom_du_fichier \;</code> | ||
+ | |||
+ | === xargs === | ||
Ou bien avec **xargs** : | Ou bien avec **xargs** : | ||
Ligne 532: | Ligne 538: | ||
find -type f -iname nom_du_fichier | xargs cat > nom_du_fichier \;</code> | find -type f -iname nom_du_fichier | xargs cat > nom_du_fichier \;</code> | ||
- | Ou encore avec la commande **cp** : | + | === cp === |
+ | |||
+ | Ou encore avec [[commande:cp|la commande cp]] : | ||
<code bash> | <code bash> | ||
find -type f -iname nom_du_fichier -exec cp /dev/null {} \;</code> | find -type f -iname nom_du_fichier -exec cp /dev/null {} \;</code> |