LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Command line args..

[ILUG] Command line args..

kevin lyda kevin at suberic.net
Thu Jun 17 16:28:08 IST 1999


"John P. Looney" burst across the net:
> What I'm actually doing is using find to gather info on the filesystem,
>and dumping it into a table regularly. Maybe later, I'll make a kernel
>thread that updates said databases, in realtime, but that can wait ;)

i think the bad times are due more to fs design and the layout of the
metadata then a lack of a db.  in fact the metadata is the db, and if
it were layed out in a smaller area of the disk (or on another disk)
it would be quicker.  the be fs is done like a db iirc.  but the way
unix accesses files, and authenticates access to files/dirs is probably
also an issue.  locate runs as nobody and therefore doesn't even
catalog all the files - what would your daemon do?

you might want to consider why this problem hasn't been solved.
i think a lot of people haven't found it necessary since it would slow
down operations done 99% of the time to speed up operations done 1%
of the time.

news servers actually try to *reduce* the amount of metadata written
(the noatime option) and that's an application that made the most use
of the fs as db concept.  i suspect the best answer would lie in writing
an fs that could quickly respond to find requests.

i'm not even 75% sure of some of these things, so it would be interesting
to know exactly what slows down find.

> Hmm. That's an idea. Just string a load of predicates together like find.
>How would you do an "or" ?
>
> (find / -user 288 -o -size +10k ; find / -user 20 -o -size +100k ) | uniq

-o

find / -user 288 -o -size +10k -o -user 20 -o -size +100k -print

if you wanted to look for files owned by 288 and > 10k or files
owned by 20 and > 100k you would do:

find / \( -user 288 -and -size +10k \) -o\( -user 20 -and -size +100k\) -print

the -and's are optional

kevin




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell