HP Visualize J5000 HP Workstations - Graphics Administration Guide For Red Hat - Page 8
Pathnames, Using \, Using find
View all HP Visualize J5000 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 8 highlights
Chapter 1 Pathnames This chapter contains information on locating files that reside at some location in the file system. Using "whereis" Using "find" HP X Window System OpenGL® Using "whereis" There are two main methods of finding files, assuming you know the name of the file you're looking for. The first method is to use the Bash-shell commands whereis or which, which tell you where commands reside (if you're using the Korn shell, you can use the system command whence): $ whereis mknod /etc/mknod The above approach, while satisfactory in many cases, has two limitations: First, the current Linux version of whereis features a fixed directory search path. It will only locate commands residing in this path. The command which searches the current PATH variable for executable binaries. All of these commands can only find things if you tell them where to look. They are still valuable, though: you may not remember which, of the dozens of directories that may be in your PATH variable, is where a particular command resides. Also, if you have two commands of the same name in two different directories, whereis, which, and whence will tell you which one will be found first, and thus executed. Secondly, whereis, which, and whence only find executable files; that is, commands (both compiled programs and shell scripts). If you want to find a file that is not executable an include file, for instance, whereis and whence will not find it, even if the include file's directory is in your PATH. To find non-executable files, you can use find, which is discussed below. Using "find" The find command will find any file in your file system, executable or not. For example, to locate the include file we couldn't locate above, you could say: $ find / -name '' where is the name of the file you're looking for. In the above example, the "/" is the root directory, and everything is under that, so, assuming you specified the correct file name, and it is somewhere in the file system, the above command is guaranteed to find what you're looking for, though it make take a while. You can shorten the search time by giving a subdirectory here, if you know it; for example, "find /opt ...". Also, you can specify just a partial filename; find will locate all files containing a Graphics Administration Guide For Red Hat Linux 6.2