On Fri, Nov 30, 2012 at 8:02 PM, Girish Venkatachalam
<[email protected]> wrote:
> On Fri, Nov 30, 2012 at 5:21 PM, Guruprasad <[email protected]> wrote:
>>
>> On Fri, Nov 30, 2012 at 4:35 PM, Girish Venkatachalam
>> <[email protected]> wrote:
>> > You have watch command.
>> >
>> > $ watch ls -ltr
>> >
>> > or you can get a clock with watch.
>> >
>> > Just think...
>>
>> Doesn't this list the contents of a directory ordered by modified time
>> in reverse order? But the subject says "watch a process every few
>> seconds".
>>
>
> Please read my mail carefully. Again. Ask your friends.
>

I concur with Guruprasad.

man watch, in Debian Wheezy, gives the following:

watch - execute a program periodically, showing output fullscreen

*periodically* is the key word above.

While your *subject line* seems to suggest that  "the" process is
running continuously and one can watch it's std out/err periodically
for instance what  top does in default mode.

In the example that you have cited, ls -ltr runs once, it's std out
displayed and that PID is gone.   The next time watch executes ls -lt
is a *new* process i.e. new PID.

-- Arun Khan
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to