LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   finding the opposite... (https://www.linuxquestions.org/questions/linux-general-1/finding-the-opposite-32947/)

PokerFace 10-16-2002 07:39 AM

finding the opposite...
 
Hi,

is there a way that I can display al the filesnames + path that does not contain a specific string.

for example, I want all the filenames + path of files other then *.xls, *.doc, *.vsd, *.pdf and this for the directory root and all of it's subdirs.

I tried with:
find /root -type f | grep -v *.xls
but this gives me all the files, even the *.xls ones... :(

Can this be done or is it impossible what I ask from my linux machine?

Thanks in advance,

PF

unSpawn 10-16-2002 08:15 AM

Re: finding the opposite...
 
find /root -type f | grep -v *.xls
Ooow, playing with the root account?.. :-]
try "find /root -type f -not -name \*.xls"


All times are GMT -5. The time now is 04:52 PM.