|
|
Directory searching consumes a lot of time, especially in
those applications that utilize deep directory structures and long
pathnames. Judicious use of cd, the change
directory command, can help shorten long pathnames and thus
reduce the number of directory searches needed. For example, try
the following commands:
time ls -l /usr/bin/* >/dev/null
time cd /usr/bin; ls -l * >/dev/null
The second command runs faster because of the fewer directory searches.