]> cygwin.com Git - cygwin-apps/cygutils.git/blame - src-pd/namei.c
migrate includes to common.h; insure that every .c and .h file has appropriate licens...
[cygwin-apps/cygutils.git] / src-pd / namei.c
CommitLineData
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
26The namei program
27
28By: Roger S. Southwick
29
30May 2, 1990
31
32
33Modifications by Steve Tell March 28, 1991
34
35usage: namei pathname [pathname ... ]
36
37This program reads it's arguments as pathnames to any type
38of Unix file (symlinks, files, directories, and so forth).
39The program then follows each pathname until a terminal
40point is found (a file, directory, char device, etc).
41If it finds a symbolic link, we show the link, and start
42following it, indenting the output to show the context.
43
44This program is useful for finding a "too many levels of
45symbolic links" problems.
46
47For 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
59The program prints an informative messages when we exceed
60the maximum number of symbolic links this system can have.
61
62The program exits with a 1 status ONLY if it finds it cannot
63chdir to /, or if it encounters an unknown file type.
64
65