Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
144 user(s) are online (139 user(s) are browsing Forums)

Members: 0
Guests: 144

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
Does anyone know if there is an equivalent of lsof for AmigaDOS or any other way of listing open files?

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
Please explain for us deadly what that command does!
ls? dir? Or are you trying to do a directory wide?

1989-> A500, A600, A3000, A4000, A1200, CD32, µA1, PegII, A1XE, CDTV, Amy/416D79, A1X5000, Vampire 500 V2+, Vampire 600 V2, Amy-ITX, Denise ITX <-2024
Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
"lsof is a command meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them."

The key word is "open". Ultimately I want to know if a particular file is still being written to.

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
Sorrry no , I don't think thats possible here right now! ;)
Please move on!

Of course some old fkn guru will prove me wrong, so lets have it!

1989-> A500, A600, A3000, A4000, A1200, CD32, µA1, PegII, A1XE, CDTV, Amy/416D79, A1X5000, Vampire 500 V2+, Vampire 600 V2, Amy-ITX, Denise ITX <-2024
Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
But you could always develop a lsof and put it in C:

Edit: Sorry for sounding harsh, all new Amiga dev is golden!

1989-> A500, A600, A3000, A4000, A1200, CD32, µA1, PegII, A1XE, CDTV, Amy/416D79, A1X5000, Vampire 500 V2+, Vampire 600 V2, Amy-ITX, Denise ITX <-2024
Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@daveyw

Would Snoopy give a list? Possibly Ranger as it can list some files handles. I've used it before to check on some files before.

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@Hypex

Need something I can integrate into a script.

Working on a small project that monitors a file download and performs an action when completed. Currently looking for the file comment to be entered but would prefer a more robust solution.

Go to top
Re: Lsof AmigaDOS?
Home away from home
Home away from home


See User information
@daveyw


curl or wget

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@LiveForItQuote:
LiveForIt wrote:@daveyw


curl or wget


Not sure how they might be used; I don't need something to initiate a download - anything like a browser or ftp client can do that - I need a method of indicating a download has completed (successfully).

Go to top
Re: Lsof AmigaDOS?
Quite a regular
Quite a regular


See User information
A crude hack would be to poll the file size and check that it has not increased say... 5 times in row.

But I guess the issue would be getting the name of the file in the first place. You could assume the most recent file in the directory is the downloadee. But then you need to know the location of the download directory.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@rjd324

I've already rejected that approach as it can't distinguish between a download that has completed and a download that has failed or stalled. My current hack is more reliable.

Download directory is not a problem, its always looking in a specific place. It will process all files in there that have completed download.

Go to top
Re: Lsof AmigaDOS?
Amigans Defender
Amigans Defender


See User information
@daveyw

The correct method is to use StartNotify() which (IIRC) will tell you when the file is closed.

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@Chris

Thanks Chris, but my skills are limited to arexx and DOS scripts.

Go to top
Re: Lsof AmigaDOS?
Just popping in
Just popping in


See User information
@daveyw

Perhaps you could try opening the file, on the assumption that any file that is actively being written is going to have an exclusive lock on it, so opening it will fail. If the open succeeds, the file must have been closed and the lock released. If using a DOS script, you could use any DOS command that opens a file and does something harmless if it succeeds (i.e. CountLines).

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@daveyw

Okay I see. By the looks of it there isn't a command to do that. I think that is slightly lower level as that descends into DOS internals. We don't even have a top command. I didn't realise it until I needed it that we can't even do something as simple as listing current tasks. To see what is hogging CPU.

The suggestion for a DOS function maybe the way to go if you use ARexx as ARexx can call library functions. I'm not sure if ARexx can actually list open files but ARexx tends to go deeper than what DOS scripts can provide.

Aside from that writing your own binary to use as a command is another solution but more work. However sometimes it's needed on AmigaOS.

Go to top
Re: Lsof AmigaDOS?
Just can't stay away
Just can't stay away


See User information
@Hypex
Quote:
We don't even have a top command.
Actually we have at least 2 of them.
However, my "top" can't be used in DOS or ARexx scripts since it running infinitely until you stop it with Ctrl-C, but maybe Capehill's "Tequila" can be used that way.

Go to top
Re: Lsof AmigaDOS?
Quite a regular
Quite a regular


See User information
@daveyw



Would WaitNofify command on OS4 Depot do what you want ?

Go to top
Re: Lsof AmigaDOS?
Amigans Defender
Amigans Defender


See User information
If you have SDK installed you will find in SDK:C/FileHandleScan

https://www.amigans.net/modules/newbb/ ... id=127371#forumpost127371

:)

i'm really tired...
Go to top
Re: Lsof AmigaDOS?
Amigans Defender
Amigans Defender


See User information
@BillE

Quote:

Would Wait
Nofify command on OS4 Depot do what you want ?


Nice find.

Go to top
Re: Lsof AmigaDOS?
Not too shy to talk
Not too shy to talk


See User information
@BillEQuote:
BillE wrote:@daveyw



Would WaitNofify command on OS4 Depot do what you want ?


Looks promising, I will check it out. Thanks.

Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project