- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How can I know that a file is being accessed ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 07:35 AM
тАО12-19-2007 07:35 AM
we have a HP-UX system B.11.23.
I would like to know if I can issue a statement to know if a pdf-file is being accessed by Adobe Reader.
The files are placed on a windows file-server which is mounted in our unix. Sometimes files are accessed by users (mostly using Adobe Reader).
In Windows you cannot delete a file which is being accessed. In unix the file is always deleted, even if it is being accessed. That can be a problem for us.
Is there a way in unix to know whether the file is being accessed ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 09:09 AM
тАО12-19-2007 09:09 AM
Re: How can I know that a file is being accessed ?
servera:root /opt/ignite/share/doc # fuser diskmirror.pdf
diskmirror.pdf: 3440o
servera:root /opt/ignite/share/doc # ps -ef | grep 3440
root 4202 3472 1 11:08:16 pts/2 0:00 grep 3440
root 3440 3389 0 11:05:05 pts/0 0:03 /opt/Acrobat5/Reader/hppahpux/bin/acroread
Or you could do the same type of thing with lsof | grep diskmirror.pdf
servera:root /opt/ignite/share/doc # lsof | grep -i diskmirror.pdf
acroread 3440 root 24r VREG 64,0x5 67407 17271 /opt/ignite/share/doc/diskmirror.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 10:56 AM
тАО12-19-2007 10:56 AM
Re: How can I know that a file is being accessed ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 11:00 AM
тАО12-19-2007 11:00 AM
Re: How can I know that a file is being accessed ?
In Windoze, a reader accessing the file marks it open. I assume that you are using CFS or something similar to share this Unix file system to multiple users. The Windows file system reports the file being open to the Windows system, but not to Unix.
The Unix side will delete the file do to a lack of a file lock.
You could make an enhancement to Microsoft for proper NFS file system support at version 2 or higher.. But good luck with that one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 11:01 AM
тАО12-19-2007 11:01 AM
Re: How can I know that a file is being accessed ?
In Windoze, a reader accessing the file marks it open. I assume that you are using CFS or something similar to share this Unix file system to multiple users. The Windows file system reports the file being open to the Windows system, but not to Unix.
The Unix side will delete the file do to a lack of a file lock.
You could make an enhancement request to Microsoft for proper NFS file system support at version 2 or higher.. But good luck with that one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 11:56 AM
тАО12-19-2007 11:56 AM
Re: How can I know that a file is being accessed ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 12:46 PM
тАО12-19-2007 12:46 PM
Re: How can I know that a file is being accessed ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2007 11:59 PM
тАО12-19-2007 11:59 PM
Re: How can I know that a file is being accessed ?
Thanks for the replies so far. I will try to clarify my issue.
We are working with an oracle application server and an oracle database which runs on a Unix server.
We have a windows-file server with pdf-files. We have written an oracle web-application where users can view the pdf-files. I want the pdf-file to be deleted after it is opened (by adobe reader).
The only way I can do this is, is by giving a Unix-command (rm) because I need to write PL/SQL that is turning on my database which is on a unix server.
The problem I am having is that when I issue the rm-command the file is not yet opened on the client, resulting in a 'no file found' (the file is deleted too early). So I need something to test if the file is being accessed, so my application can wait until the the file is accessed and then delete the file afterwards.
Best Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2007 07:21 AM
тАО12-21-2007 07:21 AM
Re: How can I know that a file is being accessed ?
But I can't use that because I cannot test on the time. I need a status or something that tells me that the file is being accessed.
Is there some statement that gives me a status ?
Regards,
Brecht
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-21-2007 08:24 AM
тАО12-21-2007 08:24 AM
Re: How can I know that a file is being accessed ?
So if you could state what problem you are trying to address, maybe folks here can offer some alternatives.