I tried:
grep "6 0 1 1 0.4154" /media/linux/DATADISK/*
but it does not search in subdirectories of the directory DATADISK.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityFrom grep
's man page:
-r, --recursive
Read all files under each directory, recursively,
following symbolic links only if they are on the command
line.
So grep -r ...
will do the trick. When grep
ping multiple files I find it useful to also add -H
so that the name of the matching file(s) is also printed (this is the default on Linux, but not on other platforms).
-R
not -r
since, as you explain, -r
will not follow symlinks.
man grep
orinfo grep
) should tell you how to do it.