![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| mkdir | mirusnet | UNIX for Advanced & Expert Users | 3 | 02-23-2008 05:00 AM |
| mkdir | big123456 | Shell Programming and Scripting | 2 | 07-22-2006 07:23 AM |
| calling mkdir from PHP | gmclean2006 | UNIX for Dummies Questions & Answers | 4 | 06-15-2006 06:23 PM |
| install vs mkdir | thmnetwork | Linux | 1 | 03-30-2005 08:25 PM |
| Can't mkdir in /home | leond | UNIX for Dummies Questions & Answers | 5 | 03-05-2003 07:04 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
mkdir limitations
What characters can't be used with a mkdir? Any limits on length of name?
Thank you, Randy M. Zeitman http://www.StoneRoseDesign.com |
| Forum Sponsor | ||
|
|
|
|||
|
You might find man -k <keyword> useful too.
(where <keyword> is a word of your choosing ) This lets you put in a keyword like 'directory' and find what man pages are available for it. Handy if you don't know the command name you want to read about.
__________________
Pete |
|
||||
|
I did a "man mkdir" and I didn't find an answer to these questions.
The mkdir() system call code in the kernel does not directly impose a limit on the length of a filename. However it must talk to the code for filesystem and this will impose a limit. What that limit is depends on the file system. Posix will guarantee at least 14 characters. To be posix compliant, a unix system must allow at least that much. HP-UX still supports the "short filename" option. If you choose, you can make HP-UX enforce a 14 character limit. This is rarely done. The most common limit these days is 255 characters for a filename. And the most common limit for a full path name is 1023. You probably will find that you have a pathconf() system call that can determine your exact limit. Note that you must give pathconf() a file name because the limits can vary from filesystem to filesystem. Because a slash is used to separate the components of a pathname, a slash cannot be used inside a component. And binary zero is used to terminate a string. So no binary zeros either. Any other byte value is fair game as far as the kernel is concerned. A filename with an embedded carriage return will cause you nasty problems. And you really will be better off if you limit yourself to printable characters. |
||||
| Google UNIX.COM |