LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 07: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, 08:15 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,285
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
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 04:12 AM
load(lin) -- the opposite JrLz Linux - General 2 05-09-2005 02:16 AM
what's the opposite of operator!() jhorvath Programming 5 11-02-2003 08:21 PM
the opposite command of su? can i access user logins when i am root? how? kublador Linux - Newbie 3 09-11-2003 03:43 AM
Opposite to modprobe? Thymox Linux - Software 4 12-11-2002 10:40 AM


All times are GMT -5. The time now is 09:32 AM.

Main Menu
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