On Wed, 2003-07-09 at 05:00, Asier Goikoetxea Yanci wrote: > Hi guys, > > I was wondering if it is possible or not to specify a maximum size for a > specific folder. I know you can setup a maximum HD space for each user but > what I want to do is to limit just one folder. Is is possible? > > I also would like to know if there is any standard C function to know the size > of a file. > > Thanks > > Asier >
Asier, The command you may want is ulimit. This will limit the size of a specific file and since in Linux everything is a file it has affect on directories as well. (Although not as fine tuned.) The man page for Ulimite bytes and I haven't found a good ref on how to use it here. Basically you enter a size in k so for a 2 meg limit you would do ulimit 2048 and now you can't create a file larger than 2 megs. Since I usually use things the way they are (unlimited) I do it that way. Downside. This affects all users on the box. All file systems etc. For something finer grained I'm not sure. James
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
