# ls.md -rw-r--r-- 2.1 KiB View raw

#GNU

LOC File
5629 ls.c
2 ls-ls.c
2 ls-dir.c
2 ls-vdir.c
10 ls.h
5645 Total

#POSIX

Not mentioned in the man page

#Notes

#FreeBSD

LOC File
1024 ls.c
839 print.c
236 util.c
213 cmp.c
89 ls.h
80 extern.h
2481 Total

#POSIX

From the man page:

With the exception of options -g, -n and -o, the ls utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”) and IEEE Std 1003.1-2008 (“POSIX.1”). The options -B, -D, -G, -I, -T, -U, -W, -Z, -b, -h, -w, -y and -, are non-standard extensions.

#OpenBSD

LOC File
13 main.c
619 ls.c
382 print.c
70 util.c
167 cmp.c
57 utf8.c
77 ls.h
54 extern.h
1439 Total

#POSIX

From the man page:

The ls utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification, except behaviour for the -o flag differs.

The flags [-hT], as well as the BLOCKSIZE environment variable, are extensions to that specification.

The flags [-go] are marked by IEEE Std 1003.1-2008 (“POSIX.1”) as being an X/Open System Interfaces option.

Historically, the -g flag was used to specify that the group field be included in long listings. The group field is now automatically included in the long listing for files and the meaning of the -g flag has been changed in order to be compatible with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.

#NetBSD

LOC File
50 main.c
717 ls.c
579 print.c
168 util.c
199 cmp.c
81 ls.h
53 extern.h
1847 Total

#POSIX

From the man page:

The ls utility is expected to be a superset of the IEEE Std 1003.2 (“POSIX.2”) specification.