The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
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 08:04 AM
mkdir limitations flignar UNIX for Dummies Questions & Answers 12 08-30-2002 11:30 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-23-2008
mirusnet's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 139
mkdir

Is there ant way to increase max number of folders in the directory from the 32766:

Problem UFS:
Code:
shell>mkdir mmm
mkdir: mmm: Too many links
But there are no links, just folders.

Code:
shell>ls | wc -l
32766
Reply With Quote
Forum Sponsor
  #2  
Old 02-23-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,298
A link can be a file too. The system call for rm is unlink(). When you see that message, among other things, it means you'll have really bad performance. Finding a file will take forever. Change the directory layout.

UNIX systems have different filesystems (software that manages files on a disk) on a single machine.

/etc/fstab will tell you which filesystem you have on the disk with your problem.
As a temporary fix, you'll have to start moving files off that directory to others.

What OS and filesystem is it?

Use df -i <directory> to see how many inodes are left in the filesystem. Just to be sure.

Last edited by jim mcnamara; 02-23-2008 at 04:51 AM.
Reply With Quote
  #3  
Old 02-23-2008
mirusnet's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 139
This is well known information...
And I wrote that this is UFS...
I can not move files to another directory.
Anyway there is no normal method to change this parameter,
maximum 2^15 -1 -2 for "." and "..".
Reply With Quote
  #4  
Old 02-23-2008
Registered User
 

Join Date: May 2007
Location: Glasgow, Scotland
Posts: 59
Mirusnet, you're right, there's no normal way to change this param on UFS.

From the Sun manual -

Quote:
The maximum number of subdirectories per directory in a UFS file system is 32,767. This limit is predefined and cannot be changed.
Although this is easily avoided by changing your approach to this issue; Unix file systems are not optimised for large numbers of files in directories (although this can be tweaked using tunefs), you will get much better performance by having a deeper structure rather than a flat one. Implement an index layer on top of your existing flat structure, go for a B+ tree type approach.

Hope this helps,

-c
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:15 AM.


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

Content Relevant URLs by vBSEO 3.2.0