Closed sibrcode closed 5 years ago
We can't easily use fmsadmin list files
command, because that requires authentication.
For macOS we can use the lsof command to list the .fmp12 files that are open:
lsof -Fn | cut -c2-| grep ".fmp12$"
But we should use the -p option to restrict to just the fmserverd process. Sticky point though is that macOS does have the pidof command.
Aha, we can use pgrep.
So a complete shell command is:
/usr/sbin/lsof -Fn -p `/usr/bin/pgrep fmserverd` | /usr/bin/cut -c2-| /usr/bin/grep ".fmp12$" | /usr/bin/sort
filemaker_open_files.rb added.
Need a fact to list the file names (including paths?) of the currently hosted files.