Operating System - HP-UX
1836442 Members
3618 Online
110100 Solutions
New Discussion

checking file in transmission

 
dude70_1
Advisor

checking file in transmission

Hi,

I need a script where I want to find whether a file is being in transmission or not. Can sombody throw some light?

Thanks.
Dude.
2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: checking file in transmission

If you want to check whether or not a file is in use you can user fuser or lsof. fuser is part of HP-UX while lsof must downloaded from one of the porting centers ( http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.70/ ).

# fuser -u filename

While give the userid and process name that has a file open. If the file is still being transmitted then it will be open. 'man fuser' for more details.
Denver Osborn
Honored Contributor

Re: checking file in transmission

Dude

How is the file being xfered? Wouldn't it be just as easy to enable logging with the app that's xfering the file? If it's being done with scp or sftp, there is a logging patch you add to the openssh build. It works pretty good. If you need to see if a process has a file open, try lsof.

Hope this helps,
-denver