Answer the question
In order to leave comments, you need to log in
How to limit the maximum size of a directory?
Is it possible to limit the maximum size of a directory in linux? I need this in order to test how the application will behave when out of memory (maybe there are better ways).
Answer the question
In order to leave comments, you need to log in
Create a disk with a size of almost 100mb and mount to /home/user if such a directory exists:
dd if=/dev/zero of=/userdisk.fs bs=1024 count=100000
mkfs.ext3 /userdisk.fs
mount -t ext3 -o loop /userdisk.fs /home/user
umount /home/user
shred /userdisk.fs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question