Command differences due to symbolic links

Certain directories such as /etc, /dev, /tmp, and /var were converted to symbolic links. Some shell commands have minor behavioral differences when referring to symbolic links than for regular files or directories. For example, ls does not follow symbolic links by default. Before Release 9, /etc was a directory, so ls /etc would display all files in /etc. Beginning in Release 9, /etc became a symbolic link, so ls /etc displays only the symbolic link. In this case, it is /etc.

In order to follow symbolic links, you must specify ls -L or provide a trailing slash. For example, ls -L /etc and ls /etc/ both display the files in the directory that the /etc symbolic link points to.

Other shell commands that have differences due to symbolic links are chmod, du, find, pax, rm, and tar.

While these behavioral changes should be minor, users can tailor command defaults by creating aliases for the shell command. For example, if you want ls to follow symbolic links, you can issue the command:
alias ls="ls -L"

Aliases are typically defined in the user's ENV file. See the alias command description in z/OS UNIX System Services Command Reference for more information about alias.

After you establish the alias, ls will follow all symbolic links.

An administrator can put alias commands in the /etc/profile directory , which might affect login shells. This action is not suggested, because changing the default behavior in /etc/profile might produce unexpected results in shell scripts or by shell users.