- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- fopen fails for path name of more than 255 charact...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 08:20 PM
тАО08-31-2005 08:20 PM
fopen fails for path name of more than 255 characters
How can I open a file with path name more than 255 characters using fopen?
TIA
Satya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 08:24 PM
тАО08-31-2005 08:24 PM
Re: fopen fails for path name of more than 255 characters
Information are available as,
-- man fopen --
[ENAMETOOLONG] The length of the pathname string exceeds PATH_MAX or a
pathname component is longer than NAME_MAX while
POSIX_NO_TRUNC is in effect.
-- /usr/include/limits.h --
# define PATH_MAX 1023 /* max number of characters in a pathname (not
including terminating null) */
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 08:28 PM
тАО08-31-2005 08:28 PM
Re: fopen fails for path name of more than 255 characters
ref: man errno
[ENAMETOOLONG] File name too long. A path specified exceeds the
maximum path length for the system. The maximum path
length is specified by PATH_MAX and is defined in
bytes. This error is also generated if the length of a
path name component exceeds NAME_MAX and the
_POSIX_NO_TRUNC option is in effect for the specified
path. Currently, _POSIX_NO_TRUNC is in effect only for
HFS file systems configured to allow path name
components up to 255 bytes long (see convertfs(1M)) and
therefore only path names referring to such file
systems can generate the error for this case. The
values of NAME_MAX, PATH_MAX, and _POSIX_NO_TRUNC for a
particular path name can be queried by using the
pathconf() system call (see pathconf(2)).
hth.
- Tags:
- ENAMETOOLONG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 09:16 PM
тАО08-31-2005 09:16 PM
Re: fopen fails for path name of more than 255 characters
Is there no way, I can have a pathname more than 255 on HFS filesytem and successfully open using fopen?
TIA
Satya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2005 10:06 PM
тАО08-31-2005 10:06 PM
Re: fopen fails for path name of more than 255 characters
More Reference:
http://www.faqs.org/faqs/hp/hpux-faq/
Subject: 5.3.1 How can I enable long file names?
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2005 03:16 AM
тАО09-01-2005 03:16 AM
Re: fopen fails for path name of more than 255 characters
TIA
Satya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2005 04:25 AM
тАО09-01-2005 04:25 AM
Re: fopen fails for path name of more than 255 characters
long rc;
rc = pathconf(dir_name, _PC_NO_TRUNC);
Will return -1 on error and set errno, else will return 0 or 1. If it returns 1, then that directory cannot contain a filename of > 255 characters length.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2005 09:53 PM
тАО09-01-2005 09:53 PM
Re: fopen fails for path name of more than 255 characters
what you are getting. what is your uname -a o/p?
hth.