[SunHELP] What is the maximum length of a file name on Solari s 7?

Adams, Christopher sunhelp at sunhelp.org
Thu Jan 25 13:44:33 CST 2001


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C08707.3DB8A6EA
Content-Type: text/plain;
	charset="windows-1252"

Thanks!

-----Original Message-----
From: Nicholas Dronen [mailto:ndronen at frii.com]
Sent: Wednesday, January 24, 2001 3:29 PM
To: sunhelp at sunhelp.org
Subject: Re: [SunHELP] What is the maximum length of a file name on
Solaris 7?


On Wed, Jan 24, 2001 at 11:51:18AM -0800, Adams, Christopher wrote:
> Hi all!
> 
> I really have just one question.  I know that the maximum length of a UNIX
> file name is related to the UNIX file system itself.  Does anyone know
where
> I can get any good information on the maximum file name length for
different
> UNIX file systems?
> 
> What is the maximum length of a file name on Solaris 7?

$ cd /usr/include/sys/fs
[01/24/01 veblen at sinai veblen]
$ grep MAXNAM ufs*.h
ufs_fsdir.h: * The maximum length of a name in a directory is MAXNAMLEN.
ufs_fsdir.h:#define     MAXNAMLEN       255
ufs_fsdir.h:    char    d_name[MAXNAMLEN + 1];  /* name must be no longer
than this */
ufs_fsdir.h:    ((sizeof (struct direct) - (MAXNAMLEN+1)) +
(((dp)->d_namlen+1+3) &~ 3))
ufs_fsdir.h: * is MAXNAMLEN - 1, and this just won't do.

I believe this limitation holds for Linux's ext2 filesystem
and AIX's jfs as well.  Dunno about the others.

Regards,

Nick Dronen
_______________________________________________
SunHELP maillist  -  SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp

------_=_NextPart_001_01C08707.3DB8A6EA
Content-Type: text/html;
	charset="windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dwindows-1252">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>RE: [SunHELP] What is the maximum length of a file name on =
Solaris 7?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Thanks!</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Nicholas Dronen [<A =
HREF=3D"mailto:ndronen at frii.com">mailto:ndronen at frii.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, January 24, 2001 3:29 PM</FONT>
<BR><FONT SIZE=3D2>To: sunhelp at sunhelp.org</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [SunHELP] What is the maximum length of =
a file name on</FONT>
<BR><FONT SIZE=3D2>Solaris 7?</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>On Wed, Jan 24, 2001 at 11:51:18AM -0800, Adams, =
Christopher wrote:</FONT>
<BR><FONT SIZE=3D2>> Hi all!</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> I really have just one question.  I know =
that the maximum length of a UNIX</FONT>
<BR><FONT SIZE=3D2>> file name is related to the UNIX file system =
itself.  Does anyone know where</FONT>
<BR><FONT SIZE=3D2>> I can get any good information on the maximum =
file name length for different</FONT>
<BR><FONT SIZE=3D2>> UNIX file systems?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> What is the maximum length of a file name on =
Solaris 7?</FONT>
</P>

<P><FONT SIZE=3D2>$ cd /usr/include/sys/fs</FONT>
<BR><FONT SIZE=3D2>[01/24/01 veblen at sinai veblen]</FONT>
<BR><FONT SIZE=3D2>$ grep MAXNAM ufs*.h</FONT>
<BR><FONT SIZE=3D2>ufs_fsdir.h: * The maximum length of a name in a =
directory is MAXNAMLEN.</FONT>
<BR><FONT SIZE=3D2>ufs_fsdir.h:#define     =
MAXNAMLEN       255</FONT>
<BR><FONT SIZE=3D2>ufs_fsdir.h:    =
char    d_name[MAXNAMLEN + 1];  /* name must be no =
longer</FONT>
<BR><FONT SIZE=3D2>than this */</FONT>
<BR><FONT SIZE=3D2>ufs_fsdir.h:    ((sizeof (struct =
direct) - (MAXNAMLEN+1)) +</FONT>
<BR><FONT SIZE=3D2>(((dp)->d_namlen+1+3) &~ 3))</FONT>
<BR><FONT SIZE=3D2>ufs_fsdir.h: * is MAXNAMLEN - 1, and this just won't =
do.</FONT>
</P>

<P><FONT SIZE=3D2>I believe this limitation holds for Linux's ext2 =
filesystem</FONT>
<BR><FONT SIZE=3D2>and AIX's jfs as well.  Dunno about the =
others.</FONT>
</P>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>

<P><FONT SIZE=3D2>Nick Dronen</FONT>
<BR><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>SunHELP maillist  -  =
SunHELP at sunhelp.org</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.sunhelp.org/mailman/listinfo/sunhelp" =
TARGET=3D"_blank">http://www.sunhelp.org/mailman/listinfo/sunhelp</A></F=
ONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C08707.3DB8A6EA--



More information about the SunHELP mailing list