Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 2002 14:05:50 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Jimmy Lantz <jimmy.lantz@lusidor.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: file naming rulesets/conventions/limitations
Message-ID:  <20021003120550.GA64496@falcon.midgard.homeip.net>
In-Reply-To: <5.1.0.14.0.20021003132831.02f52e38@mail.lusidor.nu>
References:  <5.1.0.14.0.20021003132831.02f52e38@mail.lusidor.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 03, 2002 at 01:44:02PM +0200, Jimmy Lantz wrote:
> Hi,
> I wonder if there's any rulesets/conventions/limitations to filenames in=
=20
> freebsd?
> Limits to amount of chars used in filenames (I've heard 14 chars but I us=
e=20
> more and havent had any problems)
> What special chars ar allowed? (can I use @ in a filename for instance?=
=20
> I've tested, it works, just want to know if it can give me some problems=
=20
> later on...)

14 chars was the limit on old V7 systems, but that limitation
disappeared from BSD almost 20 years ago.
The answers to your questions can be found in the intro(2) manpage
which contains the following:

   File Name
     Names consisting of up to 255 (MAXNAMELEN) characters may be used
     to name an ordinary file, special file, or directory.

     These characters may be selected from the set of all ASCII char=AD
     acter excluding 0 (NUL) and the ASCII code for /' (slash).

     Note that it is generally unwise to use *', =7F', =1B' or =1D' as
     part of file names because of the special meaning attached to
     these characters by the shell.

   Path Name
     A path name is a NUL-terminated character string starting with an
     optional slash /', followed by zero or more directory names sep=AD
     arated by slashes, optionally followed by a file name.  The total
     length of a path name must be less than 1024 (MAXPATHLEN) charac=AD
     ters.

     If a path name begins with a slash, the path search begins at the
     root directory.  Otherwise, the search begins from the current
     working directory.  A slash by itself names the root directory.
     An empty pathname refers to the current directory.



[As an additional note it might also be unwise to use spaces in filenames, =
since many
 programs interpret them as separators between filenames.]



--=20
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021003120550.GA64496>