I've mounted the following network drive in Ubuntu:
//192.168.1.11/shared /media/shared cifs credentials=/home/guest/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0
This //192.168.1.11/shared
folder is used by Linux systems (Ubuntu 14+) and Windows systems (7+).
The problem that I have is that I need to know when a file is locked from Windows systems with bash scripting. Is there any way to do that?
.~lock.filename#
with the user name and hostname of the user currently editing the file. Those could be easily found by a single command. Is that what you mean?find /media/shared/ -name .~lock*
.