Dear all, It's is possible to empty file like linux (when deleted file in used by mistake)?
ex: >/proc/XXXX/fd/X
Regards,
Dear all, It's is possible to empty file like linux (when deleted file in used by mistake)?
ex: >/proc/XXXX/fd/X
Regards,
In Linux you can do
lsof | grep "(deleted)"
to find deleted but open files, and you get the file size and the accessing PID and FD (file descriptor). Then indeed you can empty the deleted file with
: > /proc/PID/fd/FD
But you ask this for HP-UX?
Yes, asking if there are similar method on HP-UX.
Well, you can download lsof from the HP-UX porting and archive center
But there is no /proc
I only know of the pstat-getfile() call as described in
https://nixdoc.net/man-pages/HP-UX/man2/pstat.2.html
But you must write a C programm to access it.
You can ask the HPE community if s.b. wrote a C programm for this.
Ok, thank you for your help, very apreciate.