Re: Limit the size of a directory

From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 11/10/04


Date: Wed, 10 Nov 2004 13:36:39 +0100

In comp.os.linux.misc Fritz Bayer <fritz-bayer@web.de>:
> ptb@lab.it.uc3m.es (Peter T. Breuer) wrote in message news:<ikt862-bfl.ln1@news.it.uc3m.es>...
>> Fritz Bayer <fritz-bayer@web.de> wrote:
>> > how do I set the maximum size of a directory, so that all files in the
>> > directory do not exceed this limit?
>>
>> You place the directory in a partition of limited size (and appropriate
>> amounts of quota, if necessary).

> To place the directory in a seperate partition is unfortuantely not an
> option. But its a good advice for the future.

> Is there any other way how I can make sure that the log will not fill
> up the harddrive?

Simply write a script running from cron, checking 'du -sk /dir'
the size and delete/zero the biggest 5 files or so if the dir is
bigger then what you want. Run every ten minutes or so.

-- 
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 226: A star wars satellite accidently blew up
the WAN.


Relevant Pages

  • Re: Limit the size of a directory
    ... Fritz Bayer wrote: ... amounts of quota, if necessary). ... Peter ...
    (comp.os.linux.misc)
  • Re: Reserving space in ext2 or ext3 for a big file.
    ... Do not create any other files in that partition. ... |> that the quota files got deleted on reboot, and perhaps when cron ran tmpwatch. ... | the first software check the free space with DF command, ...
    (comp.os.linux.misc)
  • Re: Disk Quotas on Windows 2003 SP2
    ... quota limits are enforced, my understanding is that quota enforcement is ... quotas because it would have affected all the shares on the partition. ... and we move the folders to the newly configured disk quota partition set ... in total and User2 will be able to store 5 Gigs in total and User3 will be ...
    (microsoft.public.windows.file_system)
  • Re: How to set only delete permision in a directory and theirs subdirectories.
    ... I can't use kernel quota module and I would like implement a substitute ... Correct me if I'm wrong (my experience with LVM is a pretty ... The answer is because the home partition is mounted from a iSCSI ...
    (Debian-User)
  • Re: Probleme beim Installieren.
    ... Also müsste man root Quota auf / verpassen. ... es wirkt, ist es doof, wenn root nirgends mehr schreiben darf. ... Dienst der auch was auf die Platte schreiben will? ... /home auf eine extra Partition. ...
    (de.comp.os.unix.bsd)