The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-25-2002
Registered User
 

Join Date: Aug 2002
Posts: 5
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
  #2 (permalink)  
Old 08-25-2002
BSeanD's Avatar
Registered User
 

Join Date: Aug 2002
Location: Melbourne, Australia
Posts: 127
All your answers are in the man pages.
  #3 (permalink)  
Old 08-25-2002
Registered User
 

Join Date: Aug 2002
Posts: 5
I don't know what that means...what's "in the man"? if by chance you mean a book I have four and none list the answer. I've also tried numerous Yahoo searches.
  #4 (permalink)  
Old 08-25-2002
asifraj's Avatar
Registered User
 

Join Date: Aug 2002
Location: India
Posts: 48
that means that after you login,

give the following command on the shell prompt

man mkdir
  #5 (permalink)  
Old 08-25-2002
BSeanD's Avatar
Registered User
 

Join Date: Aug 2002
Location: Melbourne, Australia
Posts: 127
Sorry flignar thought you knew what manual pages were.
Just do as asifraj says. Go to a console type in man mkdir, or anything else you may wish to have explained; typing man man, will give you a rundown on what manual pages are all about.
  #6 (permalink)  
Old 08-26-2002
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
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
  #7 (permalink)  
Old 08-26-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,354
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
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:14 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0