PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > File name length??
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

File name length??

Réponse
 
LinkBack Outils de la discussion
Vieux 28/05/2007, 19h16   #1
Dave Kelly
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut File name length??

I don't know where to ask this. If there is a better place, please let
me know.

Is there any limit on file length now-a-days?
When I started it was 8 char . 3 extension
Then it went to 26 char . 3 extension
I now have one file that is 64 char . 3 extension.

Let me explain why I ask. I admin a small web site for a fishing club.
I ask the members to send pictures of their trips. It is nothing for me
to get 30 or more pictures.

I think pictures tell a better story if there are captions to go with
each one. I wasn't on the trip so I can not write good captions telling
about the event.

I want to try to get the members to rename their pictures with a name
that would tell about the picture and can be used as a caption. I just
don't know what length to tell them.

TIA
Dave

--
A little rum in the morning coffee. Just to clear the cobwebs, ya know.
  Réponse avec citation
Vieux 28/05/2007, 20h01   #2
Janis Papanagnou
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

Dave Kelly wrote:
> I don't know where to ask this. If there is a better place, please let
> me know.
>
> Is there any limit on file length now-a-days?


Yes. Depending on the OS and filesystem.

> When I started it was 8 char . 3 extension


(Or even 6.3 - ...were there even 6 someday?)

> Then it went to 26 char . 3 extension
> I now have one file that is 64 char . 3 extension.


While there are some OSes/filesystems that allow longer names (and some
[only older ones?] that don't allow filenames of that length) you should
be safe today if you use up to 255 characters (254 if you have OS2/HPFS)
on Unixes, Macs and Windozes.

Janis

>
> Let me explain why I ask. I admin a small web site for a fishing club.
> I ask the members to send pictures of their trips. It is nothing for me
> to get 30 or more pictures.
>
> I think pictures tell a better story if there are captions to go with
> each one. I wasn't on the trip so I can not write good captions telling
> about the event.
>
> I want to try to get the members to rename their pictures with a name
> that would tell about the picture and can be used as a caption. I just
> don't know what length to tell them.
>
> TIA
> Dave
>

  Réponse avec citation
Vieux 28/05/2007, 20h10   #3
Lew Pitcher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

On May 28, 1:16 pm, Dave Kelly <daveeke...@earthlink.net> wrote:
> I don't know where to ask this. If there is a better place, please let
> me know.
>
> Is there any limit on file length now-a-days?


File lengths are governed by the size of your storage media, the type
of filesystem you use, and any quota assigned to the user or group.
Itym 'length of the filename' here.

> When I started it was 8 char . 3 extension


AFAIK, Unix has never had an 8.3 limit, especially since there was no
special meaning given to the dot character. Early Unix had a 14-
character file name restriction, as a directory entry was 16bytes long
(2 bytes for the inode, 14 bytes for the filename, no \0 terminator)

Perhaps you are thinking of CP/M or MS/DOS?

> Then it went to 26 char . 3 extension


That fits, I think. That would make a dirent 32 bytes long

> I now have one file that is 64 char . 3 extension.


Most modern Unix systems should be able to handle that.

[snip]


  Réponse avec citation
Vieux 28/05/2007, 20h37   #4
Chris F.A. Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

On 2007-05-28, Janis Papanagnou wrote:
> Dave Kelly wrote:
>> I don't know where to ask this. If there is a better place, please let
>> me know.
>>
>> Is there any limit on file length now-a-days?

>
> Yes. Depending on the OS and filesystem.


It is defined by the NAME_MAX macro. A common value is 255.

>> When I started it was 8 char . 3 extension

>
> (Or even 6.3 - ...were there even 6 someday?)


The reason the Forth language was so named rather than Fourth (as
in Fourth Generation Language) was because the file system couldn't
handle longer file names. I don't know what system that was and my
Forth book is upstairs and I'm too lazy to go and look.

--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
  Réponse avec citation
Vieux 28/05/2007, 21h14   #5
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

On Mon, 28 May 2007 20:01:27 +0200, Janis Papanagnou
<Janis_Papanagnou@hotmail.com> wrote:
>
>
> Dave Kelly wrote:
>> I don't know where to ask this. If there is a better place, please let
>> me know.
>>
>> Is there any limit on file length now-a-days?

>
> Yes. Depending on the OS and filesystem.
>
>> When I started it was 8 char . 3 extension

>
> (Or even 6.3 - ...were there even 6 someday?)
>

MS-DOS started with 8.3, as did CP/M. TOPS-10 had 6.3 filenames. If
you went to college in the 1970s or 80s, or used CompuServe during that
time, you might have used TOPS-10 or -20. The TRS-80 Model 100 used
6.2 filenames.



--
Everything I like is either illegal, immoral or fattening.
-- Alexander Woollcott
  Réponse avec citation
Vieux 28/05/2007, 22h34   #6
Dave Kelly
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

Dave Kelly wrote:

>
> I want to try to get the members to rename their pictures with a name
> that would tell about the picture and can be used as a caption. I just
> don't know what length to tell them.


Thanks to everyone for the insight and replies. I am just going to tell
them 150 characters

Dave

--
A little rum in the morning coffee. Just to clear the cobwebs, ya know.
  Réponse avec citation
Vieux 29/05/2007, 00h39   #7
Dave Kelly
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

Allodoxaphobia wrote:
> On Mon, 28 May 2007 17:16:28 GMT, Dave Kelly wrote:
>> :
>>
>> I want to try to get the members to rename their pictures with a name
>> that would tell about the picture and can be used as a caption.

>
> All the other discussion(s) aside: Good luck with *THAT* ! ! :-)
>
> Jonesy

Thanks??????????
Sounds like you've been there - tried that.

Like trying to herd a clowder of cats.

Dave

ps
I love my spell checker. It tried to change you name to:
agoraphobia
n : a morbid fear of open spaces (as fear of being caught alone
in some public place)

--
A little rum in the morning coffee. Just to clear the cobwebs, ya know.
  Réponse avec citation
Vieux 29/05/2007, 14h02   #8
loki harfagr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

On Mon, 28 May 2007 22:39:47 +0000, Dave Kelly wrote:

> Allodoxaphobia wrote:
>> On Mon, 28 May 2007 17:16:28 GMT, Dave Kelly wrote:
>>> :
>>>
>>> I want to try to get the members to rename their pictures with a name
>>> that would tell about the picture and can be used as a caption.

>>
>> All the other discussion(s) aside: Good luck with *THAT* ! ! :-)
>>
>> Jonesy

> Thanks??????????
> Sounds like you've been there - tried that.
>
> Like trying to herd a clowder of cats.
>
> Dave
>
> ps
> I love my spell checker. It tried to change you name to: agoraphobia
> n : a morbid fear of open spaces (as fear of being caught alone
> in some public place)


That's an opinion, I'm afraid ;-)
  Réponse avec citation
Vieux 29/05/2007, 17h47   #9
Allodoxaphobia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: File name length??

On Mon, 28 May 2007 22:39:47 GMT, Dave Kelly wrote:
> Allodoxaphobia wrote:
>> On Mon, 28 May 2007 17:16:28 GMT, Dave Kelly wrote:
>>> :
>>>
>>> I want to try to get the members to rename their pictures with a name
>>> that would tell about the picture and can be used as a caption.

>>
>> All the other discussion(s) aside: Good luck with *THAT* ! ! :-)
>>
>> Jonesy

> Thanks??????????
> Sounds like you've been there - tried that.
> Like trying to herd a clowder of cats.


Exactly! Even _if_ a few *know how* to rename image files. :-)

> ps
> I love my spell checker. It tried to change you name to:
> agoraphobia
> n : a morbid fear of open spaces (as fear of being caught alone
> in some public place)


Nope. For usenet, "Allodoxaphobia" pretty much covers it. <Big Grin>

http://wikidumper.blogspot.com/2006/...oxaphobia.html

Regards,
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
*** Killfiling google posts: <http://jonz.net/ng.htm>
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h57.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13411 seconds with 17 queries