]>
Commit | Line | Data |
---|---|---|
bd695173 CW |
1 | /** |
2 | * namei | |
3 | * copyright 1990,... by Roger S. Southwick | |
4 | * Modifications by Steve Tell | |
5 | * Further mods Charles Wilson | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or | |
8 | * modify it under the terms of the GNU General Public License | |
9 | * as published by the Free Software Foundation; either version 2 | |
10 | * of the License, or (at your option) any later version. | |
11 | * | |
12 | * This program is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * You should have received a copy of the GNU General Public License | |
18 | * along with this program; if not, write to the Free Software | |
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
20 | * | |
21 | * See the COPYING file for license information. | |
22 | */ | |
23 | ||
d4a28ab0 CW |
24 | /*------------------------------------------------------------- |
25 | ||
26 | The namei program | |
27 | ||
28 | By: Roger S. Southwick | |
29 | ||
30 | May 2, 1990 | |
31 | ||
32 | ||
33 | Modifications by Steve Tell March 28, 1991 | |
34 | ||
35 | usage: namei pathname [pathname ... ] | |
36 | ||
37 | This program reads it's arguments as pathnames to any type | |
38 | of Unix file (symlinks, files, directories, and so forth). | |
39 | The program then follows each pathname until a terminal | |
40 | point is found (a file, directory, char device, etc). | |
41 | If it finds a symbolic link, we show the link, and start | |
42 | following it, indenting the output to show the context. | |
43 | ||
44 | This program is useful for finding a "too many levels of | |
45 | symbolic links" problems. | |
46 | ||
47 | For each line output, the program puts a file type first: | |
48 | ||
49 | f: = the pathname we are currently trying to resolve | |
50 | d = directory | |
51 | D = directory that is a mount point | |
52 | l = symbolic link (both the link and it's contents are output) | |
53 | s = socket | |
54 | b = block device | |
55 | c = character device | |
56 | - = regular file | |
57 | ? = an error of some kind | |
58 | ||
59 | The program prints an informative messages when we exceed | |
60 | the maximum number of symbolic links this system can have. | |
61 | ||
62 | The program exits with a 1 status ONLY if it finds it cannot | |
63 | chdir to /, or if it encounters an unknown file type. | |
64 | ||
65 |