[cs631apue] Ls Midterm

Jan Schaumann jschauma at stevens.edu
Tue Oct 11 09:59:28 EDT 2011


kbhamra <kbhamra at stevens.edu> wrote:

> 1) are we suppose to print out the contents in colouring format?

No - the manual page provided to you does not mention colors at all.

> 2) What exactly are we suppose to do with the environment? I do not  
> quite understand the environment.

Your programs behaviour may change depending on the environment
variables noted in the manual page provided to you:

BLOCKSIZE   If the environment variable BLOCKSIZE is set, and the -h and
-k options are not specified, the block counts (see -s) will be
displayed in units of that size block.

TZ	   The timezone to use when displaying dates. See environ(7) for
more information.


For example, run the following commands:

ls -l
export TZ=MET
ls -l
export TZ=Australia/Sydney
ls -l
unset TZ
ls -ls
export BLOCKSIZE=1024
ls -ls
export BLOCKSIZE=2048
ls -ls

See getenv(3).

-Jan


More information about the cs631apue mailing list