My understanding is that 'stat' will find things like mode, file size, time stamps, etc. But not if the file is actually open or not. I need to be able to find all open files in a directory and close them - but not sure if using 'stat' will work. Can someone clarify this for me?
Comments
In Windows you have automatic file locking when opening a file, but in Linux there's no automatic locking, but you must use "flock" to lock it... So guys who use flock will be caught by you, but guys who don't - will slip away...
: My understanding is that 'stat' will find things like mode, file size, time stamps, etc. But not if the file is actually open or not. I need to be able to find all open files in a directory and close them - but not sure if using 'stat' will work. Can someone clarify this for me?
:
: You won't have much success with this... because this is not Windows.
:
: In Windows you have automatic file locking when opening a file, but in Linux there's no automatic locking, but you must use "flock" to lock it... So guys who use flock will be caught by you, but guys who don't - will slip away...
:
:
:
: : My understanding is that 'stat' will find things like mode, file size, time stamps, etc. But not if the file is actually open or not. I need to be able to find all open files in a directory and close them - but not sure if using 'stat' will work. Can someone clarify this for me?
: :
: