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.
Sorry if this sound a bit basic, but is it possible to limit the size of a subdirectory rather than a filesystem?
I've figured out that I can limit individual users by using quota to restrict usage per mounted filesystem, but I need two shared areas for a whole bunch of users who will be accessing these areas via guest logins under Samba. As such they'll all appear to be the same user.
Current structure is:
I need to make it so that there is a limit of 70GB under the special directory whilst allowing the general directory to use as much space as is left over.
Usually Samba will use the system quotas but you're probably looking for this that can be used within Samba when no system API can be used:
From the man page:
set quota command (G)
The set quota command should only be used whenever there is no operating system API available from the OS that samba can use.
This option is only available if Samba was configured with the argument --with-sys-quotas or on linux when was used and a working quota
api was found in the system. Most packages are configured with these options already.
This parameter should specify the path to a script that can set quota for the specified arguments.
The specified script should take the following arguments:
· 1 - quota type
· 1 - user quotas
· 2 - user default quotas (uid = -1)
· 3 - group quotas
· 4 - group default quotas (gid = -1)
· 2 - id (uid for user, gid for group, -1 if N/A)
· 3 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)
· 4 - block softlimit
· 5 - block hardlimit
· 6 - inode softlimit
· 7 - inode hardlimit
· 8(optional) - block size, defaults to 1024
The script should output at least one line of data on success. And nothing on failure.
Default: set quota command =
Example: set quota command = /usr/local/sbin/set_quota
I've never used this type of quota, so not that familiar with it myself.
In short, no, because there is no such thing as the "size" of a directory (except the size of the actual directory blocks, which is of little concern). The directory structure is merely an indexation system, not a set of containers.
I gathered what you meant, but the "total size of the file contents" doesn't really have a definitive meaning. Think about hardlinked files for example, if a file is hardlinked in two directories, which directory should count the size? The first one alphabetically? The directory with the lower inode number? Both (but then the parent directory whould have the wrong size...)?