[SOLVED] Make dummy files to take space away from users
Linux - NewbieThis 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!
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This may sound silly, but I have a volume that only has one samba share on it. I want to use up some of the free space on there as to limit how much data the users can actually put on the server. Is there a slick way in Linux to take up space, or should I just use my machine to make a bunch of very large files and copy them to a folder not in the samba share?
Thanks spiky. I guess my suggestion of just making a bunch of big files was probably the least elegant way now that I think about it haha. I'm not even sure how to make Linux make a file that is exactly a certain size to be honest.
Thanks TobiSGD. Looks like quotas require a restart and are definitely the way to go here, but I think temporarily I may be stuck manually doing that command you just gave me over and over again until I get to where I need to be. Then I can clean it up later when I get some downtime for my server.
You don't have to do it over and over again, just change the count-parameter to your needs, in the form the command is currently it gives you the filesize in MB, so just change it to 1000 if you want 1000MB to be occupied, or any other value you need. Keep in mind that you shouldn't use this method when the shared directory is in the /-partition, otherwise you will run into serious issues.
OK, thanks. I guess that leads to my next question, which I'll put in a new post as it's kinda off topic to this one. But is one way better on an ext4 filesystem, for example: one 10GB file vs. 100 100MB files, to occupy the same space. Not sure what's better for the filesystem or if it really matters, or if one way takes longer if the volume has to be fsck'd. I'll pose that question in a new thread on here, since technically this one is solved. Thanks for your help.