terminal – How to execute an equivalent function of the Xcode instruments> "File activity" in shell?

Have you tried fs_usage with the -f filesys or diskio option?


The fs_usage utility presents a continuous display of the system's call usage information pertaining to the file system activity. Requires root privileges due to the
Ease of tracking the core you use to operate. By default, the monitored activity includes all system processes, except the running fs_usage process, Terminal,
telnetd, telnet, sshd, rlogind, tcsh, csh, sh and zsh. These default values ​​can be overridden so that the output is limited to include or exclude a list of
Assignments specified by the user.