Rainer Toebbicke <[EMAIL PROTECTED]> writes:
> It's not always a problem of aliases: on my HP9000/720, HP-UX 9.01 all
> sorts of ls'es, /bin/ls, \ls take about an hour if applied to /afs. Looks
> like the HP-UX ls command insists on looking at file attributes, the GNU
> ls command does not exhibit the problem.
This is a known HP-UX problem, with a fix. You should be able to get the
following patch from your HP representative.
Dan Bloch
----------------------------------------------------------------------
Patch Name: PHCO_1423
Patch Description: Avoid unnecessary stat calls by /bin/ls
ls is reported to run very slow for NFS mounted file systems and the
performance becomes unbearable on slow networks and in directories
having large number of files. The reason why ls runs slow is that it does
a stat() for each file in the directory. This is done so as to support
Context Dependent Files (CDFs) on HP-UX since ls needs to use stat() call to
determine if an entry existing in the directory is valid in the current
context or not. ls does not list CDFs which are not valid in the context of
the machine on which the CDF exists.
The problem was reported at customer sites using a Domain system as the
NFS server.
Fix:
A special version of ls is being provided which will work fine on systems
which do not have CDFs. By putting this restriction, calls to stat() system
call have been reduced and are not done as long as only file names are
requested. On systems containing CDFs, ls will work fine in most of the cases
but behave differently if a directory contains a hidden CDF which is not
valid in the current context ( henceforth, referred to as "hidden CDF" ).
Normally ls does not list such files unless it is invoked with -H option.
The behavior of patched version for such files will be as follows :
(i) If ls is invoked without any command line option or with a command
line option that does not print any information other than the file
name, such hidden CDFs will be displayed.
(ii) If ls is invoked with the name of this hidden CDF as a command line
argument it will print an error "... not found"
(iii) If ls is invoked with a command line option which necessitates a
stat(), hidden CDFs will not be displayed and no error will be
flagged.
(iv) If ls is invoked with -H option, the hidden CDF will be displayed with
a + sign after file name.
(v) If ls is invoked with the name of hidden CDF with a + sign appended to
the end of the file name, the individual components of the CDF will be
displayed.
The unpatched version of ls will behave the same as the patched version in
the situations 2 to 5 above; only in the first situation the patched version
of ls will behave differently. For details on CDF and process context see man
CDF(4) and context(4).
Path Name: /hp-ux_patches/s700/8.X/PHCO_1423
Effective Date: 920814