grep - ricerca nell'intero albero
Inviato: mar 12 dic 2006, 18:41
Vorrei cercare una stringa all'interno di tutti i file dell'intero albero / . Ho letto il man e un po' in giro e, se non ho capito male, dovrebbe essere così:
Il primo comando ce l'ho messo perché non ho capito come cercare recursivamente in tutto l'albero e non solo a partire dalla directory corrente (?), rileggerò il manuale.
Il problema è che
E si pianta là finché non gli do un control+c. E' normale?
Codice: Seleziona tutto
cd /
grep -r Option *Il problema è che
Codice: Seleziona tutto
$ grep -r Option *
Binary file bin/cpio matches
Binary file bin/dd matches
Binary file bin/ip matches
Binary file bin/ld_static matches
bin/lsb_release:from optparse import OptionParser
bin/lsb_release: parser = OptionParser()
grep: bin/lsmod.modutils: No such file or directory
bin/mkbimage:Options:
Binary file bin/nano matches
Binary file bin/ps matches
Binary file bin/rnano matches
Binary file bin/stty matches
Binary file bin/su matches
Binary file bin/tar matches
boot/config-2.6.17-10-generic:# Generic Driver Options
boot/config-2.6.17-10-generic:# Subsystem Options
Binary file boot/memtest86+.bin matches
boot/grub/menu.lst:## ## Start Default Options ##
boot/grub/menu.lst:## ## End Default Options ##
boot/grub/menu.lst~:## ## Start Default Options ##
boot/grub/menu.lst~:## ## End Default Options ##
grep: dev/nvidia0: No such device or address
grep: dev/nvidiactl: No such device or address
grep: dev/acpi: Permission denied
grep: dev/dri/card0: Invalid argument
grep: dev/vcsa7: Permission denied
grep: dev/vcs7: Permission denied
grep: dev/log: No such device or address