1832983 Members
2477 Online
110048 Solutions
New Discussion

Long file names

 

Long file names

I'm trying to run a vendors program that creates a file with extension ".tif". My input format is: 20000727.1.12345 . Output format should include above with .tif added. My V2500 HP-UX 11.0 is creating only a 14 character file name. Is there a way to create a long file name ?
15 REPLIES 15
Marcelo De Florio
Frequent Advisor

Re: Long file names

If you see the list of files with ls -l, and then execute ls -l > file.log. After cat file.log and compare whit the output ls -l, you can see more characters per file.
CHRIS_ANORUO
Honored Contributor

Re: Long file names

Yes, you can use the command touch to create a long file name.
Eg touch 20000727.1.123456789.tif
The file will be created and listed as any other file.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Brian M. Fisher
Honored Contributor

Re: Long file names

It is possible that this filesystem was created without long file names enabled. This would cause a 14 character limit. Use convertfs to allow the filesystem to support names up to 255 characters long.

man convertfs

Brian
<*(((>< er
Perception IS Reality
James R. Ferguson
Acclaimed Contributor

Re: Long file names

Rick Garland
Honored Contributor

Re: Long file names

Am ls -q will list non-printing characters in the filenames if you have any
Tim Malnati
Honored Contributor

Re: Long file names

When I hear 14 characters, it makes me suspect that the file system was created with the old SystemV 14 character file/directory naming limitation. I don't know of any way of changing this without completely recreating the file system. Typically, the directory structure size defaults to the same as the root file system when creating an HFS file system. The 14 character limitation has not been the default on SystemV boxes for a very long time now, suggesting that someone forced this for some strange reason??? See the man pages mkfs_hfs(1m), newfs_hfs(1m), and dir(4) for a more thorough explanation. Simple creation of any file with more than 14 characters within the same file system will test it out.

Re: Long file names

All my file systems are vxfs except /stand which is hfs.

Man pages indicate size defaults to root file system on hfs system. In my case root file system is vxfs.

convertfs man page mentions only hfs not vxfs file systems.
James R. Ferguson
Acclaimed Contributor

Re: Long file names

Curtis:

What does getconf NAME_MAX /xxx return?

/xxx is the filesystem in which you are attempting to create the file.

Also, /stand isn't ever vxfs; it's only hfs.

...JRF...

Re: Long file names

James,

getconf NAME_MAX /xxx returns 255

Thanks,
Curtis
Alan Riggs
Honored Contributor

Re: Long file names

Are you certain the problem lies in the OS? The 14 character lenght is certainly suspicious, but the checks you've done do not point to an fs built without long filename capability.

Is it possible that the vendor program has a set length for filenames and that you are exceeding it? Have you tried experimenting with the names of your input files? Figuring the .tif will add 4 characters have you run it against filenames of lenghts 9, 10, and 11 ?
James R. Ferguson
Acclaimed Contributor

Re: Long file names

Curtis:

I agree with Alan -- it looks like your filesystem hanles long names just fine. You say that the "output format should [show]...". Exactly what are you looking at that doesn't show the filename without the extension you expect?

...JRF...

Re: Long file names

run /usr/sbin/fstype -v for example
/usr/sbin/fstyp -v /dev/vg00/lvol1 there you can see a value called f_namemax: 255
the right hand side shows the length in characters of the file name.
Sundar

Re: Long file names

run /usr/sbin/fstype -v for example
/usr/sbin/fstyp -v /dev/vg00/lvol1 there you can see a value called f_namemax: 255
the right hand side shows the length in characters of the file name. if the value is 14 then run convertfs on the filesystem to support long file names .Note:convertfs is supported only on HFS.
Sundar
Manju Kampli
Trusted Contributor

Re: Long file names

if you want to convert the vxfs file system in to large files use the folloing command

fsadm -F vxfs -o largerfiles /dev/vgx/rlvol1

this should make your /dev/vgx/lvol1 file system to support large files.
Never stop "LEARNING"

Re: Long file names

Everyone:

Thanks for all your input. I changed the dots within the file name to another character (ex: _ , -) and the file name was generated > 14. Looks like something to do with the dots in the file name and could be the vendors program.

Thanks again for your input.