strace
at strace
on a Ubuntu Linux copy of ksh
does not reveal significant differences. One stat
call versus two.
$ strace test /tmp/tmp.geLaoPkXXC -ef /tmp/tmp.geLaoPkXXC
showed it:
mmap(NULL, 7220736, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f11dc80b000 close(3) = 0 stat("/tmp/tmp.geLaoPkXXC", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 stat("/tmp/tmp.geLaoPkXXC", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 close(1) = 0 close(2) = 0
... a
$ strace test -a /tmp/tmp.geLaoPkXXC
showed it:
fstat(3, {st_mode=S_IFREG|0644, st_size=7220736, ...}) = 0 mmap(NULL, 7220736, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6b49e2b000 close(3) = 0 stat("/tmp/tmp.geLaoPkXXC", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0 close(1) = 0 close(2) = 0
One stat
versus two.
$ ksh --version version sh (AT&T Research) 93u 2011-02-08
source share