find

Normale Suche

find /path/ -type f -name file-to-search

Text in Datei suchen

find . -type f -name "*.vcf" -exec grep -il 'idris' {} \;

Nach Filetype sichen

find . -exec sh -c "file '{}' | grep -q 'pattern'" \; -print

Mit Mimetype

find . -type f -exec bash -c '
    [[ "$( file -bi "$1" )" == */x-shellscript* ]]' bash {} \; -print

Rekursive Suche

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
  • find.txt
  • Zuletzt geändert: 05/03/2024 - 10:52
  • von 127.0.0.1