I am trying to use the find command to find all of the files that are checked into RCS from my home directory. This includes files that end in things like c,v
. When I run the commands such as
find . -name \*v
find . -name \*c,v
this is close to the way I want and will give me files looking like
./LABTECH/RCSlab/trig/RCS/main.c,v
This is great except if I for some reason have a random file on my computer that ends in a v or in c,v that isn't in RCS, it is going to return that, too. Things like find . -name \*RCS\*c,v
do not work and return nothing. find . -name RCS\*
will return the RCS directory, but none of the files inside the RCS directory.
Is there someway I can get a find command to return all files that are in RCS directories, starting from my home directory. I know I can filter out unwanted files afterwards, but it needs to only be showing me files from the RCS directory to begin with.
After reading all the answers I decided that assuming ,v are RCS files is the best way to go about this because we have not covered scripting for my teacher to ask us a question like that. We are not supposed to pipe into xargs or grep for the question either,and -path does not work on my version of unix. It was helpful to know from perreal that using -name does not allow me to match '/' which clears up some other questions I had but did not ask. I have come to the understanding that there is no way to do this without -path or some type of following command or script. Thank you all for your help.