30 déc. 2013

Commandes Linux: Les commandes de recherche

find
find / -atime 1 (recherche les fichiers modifiés depuis un jour)
find /home -name fichier
find / -name !(fichier)
find /usr/doc -name "LILO" -type f -print
find /usr/doc -name "*disk*" -type f -print
find / -name "*man*"
find /mnt/cdrom -name "*.html" -type f -print (trouve tous les documents au format HTML qui se trouvent sur le CDROM d'installation de Linux)
find / -name core -print
find . -name fichier.txt -exec cat {} \;
find /usr/doc -name "*.txt" -exec fgrep Linux {} /dev/null \;; (
find /urs/doc -type f -name ".gz" -exec zgrep disk {} /dev/null \; (recherche le terme "disk" à l'intérieur de plusieurs fichiers compressés)
grep (recherche les occurences de mots à l'intérieur de fichier)
grep motif fichier
grep -i motif fichier (sans tenir compte de la casse)
grep -c motif fichier (en comptant les occurences)
grep -v motif fichier (inverse la recherche, en excluant le "motif")
grep expression /répertoire/fichier
grep [aFm]in /répertoire/fichier
grep "\$" *.txt find
find / -atime 1 (recherche les fichiers modifiés depuis un jour)
find /home -name fichier
find / -name !(fichier)
find /usr/doc -name "LILO" -type f -print
find /usr/doc -name "*disk*" -type f -print
find / -name "*man*"
find /mnt/cdrom -name "*.html" -type f -print (trouve tous les documents au format HTML qui se trouvent sur le CDROM d'installation de Linux)
find / -name core -print
find . -name fichier.txt -exec cat {} \;
find /usr/doc -name "*.txt" -exec fgrep Linux {} /dev/null \;; (
find /urs/doc -type f -name ".gz" -exec zgrep disk {} /dev/null \; (recherche le terme "disk" à l'intérieur de plusieurs fichiers compressés)
grep (recherche les occurences de mots à l'intérieur de fichier)
grep motif fichier
grep -i motif fichier (sans tenir compte de la casse)
grep -c motif fichier (en comptant les occurences)
grep -v motif fichier (inverse la recherche, en excluant le "motif")
grep expression /répertoire/fichier
grep [aFm]in /répertoire/fichier
grep "\$" *.txt

Aucun commentaire:

Featured Posts

  • How to change a picture to an icon and change the folder icon10/09/2013 - 0 Comments
  • La Commande Del et sa fonction09/06/2012 - 0 Comments
  • Google's Magic31/12/2013 - 0 Comments
  • Search Engine Optimization Tips for Blogger27/03/2012 - 0 Comments
  • Le langage de description d’algorithme14/12/2013 - 1 Comments
  • blogger