find

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
find [03/09/2017 - 11:37] – angelegt thommiefind [05/03/2024 - 10:52] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
 +Normale Suche
 +
 +<code>
 +find /path/ -type f -name file-to-search
 +</code>
 +
 Text in Datei suchen Text in Datei suchen
  
Zeile 5: Zeile 11:
 </code> </code>
  
 +Nach Filetype sichen
 +
 +<code>
 +find . -exec sh -c "file '{}' | grep -q 'pattern'" \; -print
 +</code>
 +
 +Mit Mimetype
 +
 +<code>
 +find . -type f -exec bash -c '
 +    [[ "$( file -bi "$1" )" == */x-shellscript* ]]' bash {} \; -print
 +</code>
 +
 +
 +Rekursive Suche
 +
 +<code>
 +find ./ -type f -xdev -name "vmware*"
 +
 +locutus:/usr/share/icons # find ./ -type f -xdev -name "vmware*"
 +find: warning: you have specified the global option -xdev after the argument -type, but global options are not positional, i.e., -xdev affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
 +./hicolor/16x16/apps/vmware-player.png
 +./hicolor/16x16/apps/vmware-netcfg.png
 +./hicolor/16x16/apps/vmware-workstation.png
 +./hicolor/22x22/apps/vmware-player.png
 +./hicolor/22x22/apps/vmware-netcfg.png
 +./hicolor/22x22/apps/vmware-workstation.png
 +./hicolor/24x24/apps/vmware-player.png
 +./hicolor/24x24/apps/vmware-netcfg.png
 +./hicolor/24x24/apps/vmware-workstation.png
 +./hicolor/256x256/apps/vmware-player.png
 +</code>
  • find.1504438630.txt.gz
  • Zuletzt geändert: 05/03/2024 - 10:52
  • (Externe Bearbeitung)