Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-20-2012, 03:05 AM
|
#1
|
Member
Registered: Oct 2010
Posts: 101
Rep:
|
files limit
Hi Guys
how can we limit number of files will be created on a disk ?
e.g, i have a disk with 2 partition how can i limit every partition to allow create only 10 files or directory on each partition ?
thx in advance
|
|
|
07-20-2012, 03:43 AM
|
#2
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
Hi,
I don't know how or if it can be done,
take a look here (I know it's for FAT32 filesystem) and here (NTFS)
Nice table layout of FS.
I hope someone might have some info about Linux FS (ext..), I only found this.
Btw, you could use google yourself.
good luck
|
|
|
07-20-2012, 03:49 AM
|
#3
|
Member
Registered: Oct 2010
Posts: 101
Original Poster
Rep:
|
Quote:
Originally Posted by lithos
Hi,
I don't know how or if it can be done,
take a look here (I know it's for FAT32 filesystem) and here (NTFS)
Nice table layout of FS.
I hope someone might have some info about Linux FS (ext..), I only found this.
Btw, you could use google yourself.
good luck
|
thx man but my disk file system is ext3
|
|
|
07-20-2012, 04:04 AM
|
#4
|
Member
Registered: Mar 2001
Location: UK
Distribution: Mint 22, Arch, Ubuntu 22.04, Fedora 41
Posts: 195
Rep:
|
Quote:
Originally Posted by mmhs
Hi Guys
how can we limit number of files will be created on a disk ?
e.g, i have a disk with 2 partition how can i limit every partition to allow create only 10 files or directory on each partition ?
thx in advance
|
What do you expect to do by limiting to 10 files on a partition?
This seems to be a very low unusable number.
If this was music or pictures, do you only want to allow 10 tracks or images?
If you only want users to store a small amount of files, then limit the size of their partition,
or their /home partition.
Hope that helps.
|
|
|
07-20-2012, 04:08 AM
|
#5
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
I think it can be done by limiting number of inodes on filesystem during creation (option -i and -I in mkfs.ext3) or implementing quotas for inodes for given account or group (for example quotatool on Ubuntu).
|
|
1 members found this post helpful.
|
07-20-2012, 08:20 AM
|
#6
|
Member
Registered: Oct 2010
Posts: 101
Original Poster
Rep:
|
Quote:
Originally Posted by hal8000b
What do you expect to do by limiting to 10 files on a partition?
This seems to be a very low unusable number.
If this was music or pictures, do you only want to allow 10 tracks or images?
If you only want users to store a small amount of files, then limit the size of their partition,
or their /home partition.
Hope that helps.
|
i have 10 big DB files and i want to reserve all space for them !
i think limiting number of inodes is a good way i think we can do that with mkfs
|
|
|
07-20-2012, 03:42 PM
|
#7
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,121
|
Or you might exaine the settings...
Have you looked into using the quota system?
I have used it for group, server, and virtual machine quotas, but never for what you are seeking. It might be worth taking a look at.
|
|
|
07-23-2012, 03:40 AM
|
#8
|
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281
|
Quote:
Originally Posted by mmhs
i have 10 big DB files and i want to reserve all space for them
|
So, no better option would be allowing only acoount associated with database server to create files and disallowing write access for others?
|
|
|
All times are GMT -5. The time now is 09:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|