mkdir limitations

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mkdir limitations
# 1  
Old 08-25-2002
mkdir limitations

What characters can't be used with a mkdir? Any limits on length of name?

Thank you,

Randy M. Zeitman
# 2  
Old 08-25-2002
All your answers are in the man pages.
# 3  
Old 08-25-2002
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  
Old 08-26-2002
that means that after you login,

give the following command on the shell prompt

man mkdir
# 5  
Old 08-26-2002
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  
Old 08-26-2002
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.
# 7  
Old 08-26-2002
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Limitations of 'pdftotext' in Linux...

Guys: I have a customer using the 'pdftotext' utility under Linux. PDFs are received via email, converted to text, etc. and it has worked nicely for years. They received a PDF from a customer and the utility will not read it. The text file is created but it's either empty or has 1-2 bytes of... (23 Replies)
Discussion started by: kenlenard
23 Replies

2. Linux

Linux partitions and limitations

In recently reading an article on linux basics before I embark and my personal installation project I came across this passage - IDE drives have three types of partition: primary, logical, and extended. The partition table is located in the master boot record (MBR) of a disk. The MBR is the... (12 Replies)
Discussion started by: Synchlavier
12 Replies

3. Solaris

Solaris limitations

Hi, I recently started working with Solaris, and what I noticed is that a lot of commands I used to regularly use don't work, like sed -i and grep -r. I have found work arounds for these problems though but it's a pain in the ass. I'm just wondering why they decided not to include these handy... (4 Replies)
Discussion started by: Subbeh
4 Replies

4. Red Hat

Eth0 Limitations

Hi, I have noticed some performance issues on my RHEL5 server but the memory and CPU utilization on the box is fine. I have a 1G full duplexed eth0 card and I am suspicious that this may be causing the problem. My eth0 settings are as follows: Settings for eth0: Supported ports: ... (12 Replies)
Discussion started by: Duffs22
12 Replies

5. Shell Programming and Scripting

Limitations of tac/cat?

As part of a quiz assigned during my unix class I was asked to write a program to ask for a file name, print read errors, and "reverse elements in a list." I used the 'tac' command in my solution, however, I was then lectured for 5 min about the "limitations" of the 'tac' command and how a 'for'... (6 Replies)
Discussion started by:
6 Replies

6. UNIX and Linux Applications

gnuplot limitations

I'm running a simulation (programmed in C) which makes calls to gnuplot periodically to plot data I have stored. First I open a pipe to gnuplot and set it to multiplot: FILE * pipe = popen("gnuplot", "w"); fprintf(pipe, "set multiplot\n"); fflush(pipe); (this pipe stays open until the... (0 Replies)
Discussion started by: sedavidw
0 Replies

7. Solaris

Solaris 9 or 10 LUN Limitations

Is there a limit to the number of LUNS that can be concatenated using Solaris Volume manager with Soft partitions? I have worked with some AIX admins in the past and there was such a limitation therefore limiting the size the filesystem could grow to. Is there such a limitation in Solaris 9... (6 Replies)
Discussion started by: BG_JrAdmin
6 Replies

8. UNIX for Dummies Questions & Answers

Password limitations.

I would like to set my minimum password length to on Linux and AIX. However, doing this normally would only make it so newly added users will be affected by this. I would like for when I make this change, it either truncates everyone elses password, or prompts them to change it to 8+ characters.... (2 Replies)
Discussion started by: syndex
2 Replies

9. UNIX for Dummies Questions & Answers

csplit limitations

I am trying to use the csplit file on a file that contains records that have more than 2048 characters on a line. The resultant split file seems to ignore the rest of the line and I lose the data. Is there any way that csplit can handle record lengths greater than 2048? Thanks (0 Replies)
Discussion started by: ravagga
0 Replies

10. IP Networking

need help with 32 bit IP address limitations

32 bit IP addresses with class based allocation schemes have limitations. does anyone know where i could get some info on this or if you have time to spare and really want to help me, a couple of sentences. thanks milos (1 Reply)
Discussion started by: 30177005
1 Replies
Login or Register to Ask a Question