[cs631apue] Midterm Question

Jan Schaumann jschauma at stevens.edu
Sat Sep 22 11:46:06 EDT 2012


jphillip <jphillip at stevens.edu> wrote:
> I don't understand why the output of ls displays as it does on  
> lab.srcid.stevens-tech.edu:
>
>
> jphillip at nemo:~$ ls -1 ./
> GNULinux
> HW1-jphillip
> HW1-jphillip.sav
> Maildir
> Midterm
> NetBSD
> backup
> jphillip-HW2
> jphillip-hw2.tar
> junk
> test.txt
> jphillip at nemo:~$
>
>
> This isn't sorted alphabetically

It is.  Upper case letters are sorted before lower case letters (which
is trivial due to their ascii value).

> but the man page states
>
> "List information about the FILEs (the current directory by default).   
> Sort entries alphabetically if none of -cftuvSUX nor --sort."

This line is not in the manual page provided to you -- you appear to be
looking at the manual page of the linux ls version on
linux-lab.cs.stevens.edu.

Make sure to reference this manual page for the midterm assignment:
http://www.cs.stevens.edu/~jschauma/631/ls.pdf

If you prefer it to be accessible via 'man ls', then you can fetch it
and add it locally on linux-lab.cs.stevens.edu:

mkdir -p ~/man/man1
cd man/man1
wget http://www.cs.stevens.edu/~jschauma/631/ls.1

Then, add ~/man to your MANPATH environment variable and typing "man ls"
should bring up this version.

-Jan


More information about the cs631apue mailing list