LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 10-16-2002, 08:39 AM   #1
PokerFace
LQ Newbie
 
Registered: Aug 2001
Posts: 8

Rep: Reputation: 0
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
 
Old 10-16-2002, 09:15 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
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"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netatalk opposite phatbastard Linux - Software 2 11-18-2005 05:12 AM
load(lin) -- the opposite JrLz Linux - General 2 05-09-2005 03:16 AM
what's the opposite of operator!() jhorvath Programming 5 11-02-2003 09:21 PM
the opposite command of su? can i access user logins when i am root? how? kublador Linux - Newbie 3 09-11-2003 04:43 AM
Opposite to modprobe? Thymox Linux - Software 4 12-11-2002 11:40 AM


All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration