[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a program tell whether its argv[0] is 'ln -s' or a 'ln'



On Fri, 15 May 1998, Peter L. Peres wrote:


PLP> >wrong with stat()

PLP> Nothing except it's a 'read dir' type syscall that costs a lot of disk
PLP> activity and i need this for a program that is to be called fairly often

Well, if we suppose that OS has no cache at all. Just a millisecond before
this file was stat'ed and read, why should OS call to disk at all?

Maybe you try it with stat and time it? Just to know how much it takes and
what speed impact stat has?

PLP> (30 seconds or so).

So more probability it will peacefully rest in cache with no disk activity
at all.
--
frodo@sharat.co.il	\/  There shall be counsels taken
Stanislav Malyshev	/\  Stronger than Morgul-spells
phone +972-2-6245112	/\  		JRRT LotR.
http://sharat.co.il/frodo/	whois:!SM8333