any ref which can support ur ans?
Main Topics
Browse All TopicsWhat's the maximum number of level of directory i can have starting from the / ?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Directories on UNIX are just a special type of file. The only knowledge a directory has of its place in the tree is the pointer to the parent directory (..). That's why, for example, moving directories in UNIX is very fast - you just need to change a few pointers. For this reason, I think the previous answer is correct - there's no direct limit across all UNIX platforms.
There are, however, practical limits:
UNIX (POSIX) has a system-dependent configuration item called PATH_MAX which limits the total length of a file path. You can determine this limit with the pathconf function. This serves as an effective upper bound on the directory depth, with the maximum (half of PATH_MAX) achieved by naming the directories with a single character.
Even with this limit, I'm not sure there aren't tricks to work around it (e.g. a symlink from the top level deep into the tree).
There other resource limits, such as the limit on inodes and disk blocks. Each directory typically consumes a disk block and an inode. So these are independent limits, still system-dependent.
Gary
AFAIK there is no general limit of directory levels.
Just some applications have these.
In Linux only the pathlength is limited (4096, usually, see limits.h), but not the depth.
Application which limit the depth are ln (128, not shure) and NFS Version 2 (128).
Just check the sources, cause these constants may differ in sevaral versions.
this just brought a thought to me, buffer overflows, imagine if a user on a place such as geocities made a bunch of folders, if the program didn't force a limit, and then make over the path length limit and then put "; rm-rf" at the end of it, anyway...
the folder restrictions are based on the filesystem(ext3fs)
im really bored so im checking it out by doing mkdir /a/a/a/a/a/a/a etc. ill give u the result if it ever stops letting me, if it stops ill try making a file in the directory!!!
okay i think the directory limit is non-existant: the results of pwd...
VERY LONG, requires | more to stay on one page the font didnt work so its not included
AND i created a file called test.test and the results of cat test.test is(very slow) the exact contents of the file
everything goes a little slower cd'ing ls'ing cat'ing etc.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: GaryFx {http:#8293215}
Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jmcg
EE Cleanup Volunteer
Business Accounts
Answer for Membership
by: prady_21Posted on 2003-04-08 at 05:00:39ID: 8290856
"i think" as many as u want