strace - trace system calls and signals
$ echo hi > j
$ strace -e trace=open,openat,read,close cat j
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
close(3) = 0
openat(AT_FDCWD, "j", O_RDONLY) = 3
read(3, "hi\n", 131072) = 3
hi
read(3, "", 131072) = 0
close(3) = 0
close(1) = 0
close(2) = 0
+++ exited with 0 +++
$