[cs631apue] Fwd: Some questions on midterm....
Jan Schaumann
jschauma at stevens.edu
Sat Oct 5 14:21:23 EDT 2013
Tejas Nadkarni <tnadkarn at stevens.edu> wrote:
> How will -c and -x override -l? They are different. -c and -x appear to be
> modifiers of the short format. If you have -l then it will always override
> the others.
Not quite. Assuming you mean '-C' (upper case), since '-c' (lower case)
operates on the timestamps, the _last_ flag specified on the
command-line will override the others.
ls -l -x -C -l -x -x -x -x -x -x -C -C -C -C -l
is equivalent to 'ls -l', while
ls -l -l -x -C -x -x -x -x -l -l -l -l -C -C -l -x -C
is equivalent to 'ls -C'.
There are a few other flags that similarly override each other.
-Jan
More information about the cs631apue
mailing list