Stupid Linux trick - virtual partition

Stupid Linux trick number ###? - Making a virtual partition. Kinda the opposite of what I want to do.

mkdir /home/foo
dd if=/dev/zero of=/home/foo/image bs=1024 count=10240
mkfs.ext3 -F /home/foo/image
mount -t ext3 /home/foo/image /home/foo -o loop
chown foo /home/foo

This creates a 10MB home 'directory' for the user named foo. No way for them to get bigger (well, /tmp but that is beyond the scope of this example).


No comments.