[cs631apue] Sorting working on Linux, but not Unix
Jan Schaumann
jschauma at stevens.edu
Fri Sep 29 12:17:23 EDT 2017
Jason Ajmo <jajmo at stevens.edu> wrote:
> Code: https://gist.github.com/jajmo/5e4e7827fd5b52549132a6a6364c4e53
> The following are sorted based on filesize, descending (ls -lS)
> On Linux, the objects are linked with -lbsd, and include bsd/bsd.h.
>
> Output on Unix:
I think you mean 'NetBSD', which is a Unix-like OS.
https://en.wikipedia.org/wiki/Unix-like
> [vagrant at vagrant midterm]$ ./ls -lS
> total 216
> -rw-r--r-- 1 vagrant 1000 1846 Sep 28 16:29 helpers.c
> -rw-r--r-- 1 vagrant 1000 3376 Sep 29 15:59 sort.o
Weird. Looks like no sorting is taking place at all. Have you
confirmed that the code block you think is being executed is in fact
being executed?
-Jan
More information about the cs631apue
mailing list