]>
Commit | Line | Data |
---|---|---|
6dbe3af9 KZ |
1 | /*------------------------------------------------------------- |
2 | ||
3 | The namei program | |
4 | ||
5 | By: Roger S. Southwick | |
6 | ||
7 | May 2, 1990 | |
8 | ||
9 | ||
10 | Modifications by Steve Tell March 28, 1991 | |
11 | ||
12 | usage: namei pathname [pathname ... ] | |
13 | ||
14 | This program reads it's arguments as pathnames to any type | |
db8a3e23 KZ |
15 | of Unix file (symlinks, files, directories, and so forth). |
16 | The program then follows each pathname until a terminal | |
6dbe3af9 KZ |
17 | point is found (a file, directory, char device, etc). |
18 | If it finds a symbolic link, we show the link, and start | |
19 | following it, indenting the output to show the context. | |
20 | ||
21 | This program is useful for finding a "too many levels of | |
22 | symbolic links" problems. | |
23 | ||
24 | For each line output, the program puts a file type first: | |
25 | ||
26 | f: = the pathname we are currently trying to resolve | |
27 | d = directory | |
28 | D = directory that is a mount point | |
29 | l = symbolic link (both the link and it's contents are output) | |
30 | s = socket | |
31 | b = block device | |
32 | c = character device | |
f062c8a6 | 33 | p = FIFO (named pipe) |
6dbe3af9 KZ |
34 | - = regular file |
35 | ? = an error of some kind | |
36 | ||
37 | The program prints an informative messages when we exceed | |
38 | the maximum number of symbolic links this system can have. | |
39 | ||
40 | The program exits with a 1 status ONLY if it finds it cannot | |
41 | chdir to /, or if it encounters an unknown file type. | |
42 | ||
c07ebfa1 | 43 |