Re: How to let -path match only relative path?

2012-08-05 Thread James Youngman
On Sun, Aug 5, 2012 at 11:59 PM, Peng Yu wrote: > Hi, > > /tmp/main$ find . -path '*/tmp*' > /tmp/main$ find /tmp/main -path '*/tmp*' > /tmp/main > > > The above commands show that -path match the whole path (/tmp/main) They match the path of the file beginning with the start point named on the c

How to let -path match only relative path?

2012-08-05 Thread Peng Yu
Hi, /tmp/main$ find . -path '*/tmp*' /tmp/main$ find /tmp/main -path '*/tmp*' /tmp/main The above commands show that -path match the whole path (/tmp/main) rather than the relative path ('.'). Is there a way to always use the relative path so that both of the above commands returns nothing? --