If /tools is managed by the automounter, your shell causes /tools/deskset to be mounted when it builds the command hash table after setting your search path. Instead of listing all directories in /tools, create a wrapper in /usr/local/bin for the maker utility in /tools/deskset/frame6.0/bin so that you don't have to list any subdirectory of /tools in your search path:set path = ( /tools/deskset/frame6.0/bin $path )
This wrapper sets the search path as well, so that any executables invoked by maker will be able to find related utilities in its executable directory. By putting this wrapper in /usr/local/bin, you avoid having to automount /tools/frame6.0 when you log in. For just a few directories, the automounter overhead isn't that large, but with ten or more software packages loaded, logging in becomes a slow process. Furthermore, not mounting all of these filesystems when you log in shields you from server crashes: your workstation will only hang if one of the servers you're using crashes.Wrapper for maker #!/bin/sh PATH=/tools/deskset/frame6.0/bin:$PATH exec /tools/deskset/frame6.0/bin/maker
The mount invocation shows what is currently mounted, grep filters out anything that isn't local, awk prints the first argument (the mount points), xargs passes each mount point to a separate invocation of find, and find searches for files starting with the name core within the mount point's filesystem.mount | grep -v remote | awk ' { print $1 } ' | xargs -i find {} -name 'core*' - mount | /usr/bin/mailx -s"core file report" joe@eng
9.5. Advanced map tricks | 10. PC/NFS Clients |
Copyright © 2002 O'Reilly & Associates. All rights reserved.