-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to store uid, gid and perms in cache file #265
Comments
That would mean making the file format incompatible to older versions, which I am very reluctant to do: It is also in use for some backup software because it's so simple. In environments where large shared filesystems are still a thing (I haven't seen many of those over the last 20 or so years), isn't directory ownership typically implicit with the path? Do you really have directory trees where various users create files and directories all over the place? Don't departments, teams and users get some subtree assigned where they have permissions to create their own files and directories? |
The file format specification: https://github.com/shundhammer/qdirstat/blob/master/doc/cache-file-format.txt Adding another three fields is pretty trivial, of course. It would be a numeric (!) UID, GID, and octal permissions. I recall something about an UID <-> user name mapping service for NFS for environments where they may be different on different machines; that would be out of the question. The file format already has a version number in its header, which helps to identify which parser to use. But QDirStat would need to retain backwards compatibility with the old file format; that makes the code a bit uglier. |
Writing UID, GID and permissions works now in the Perl
Docs for the new file format here. The format has also become a bit prettier and easier to read for humans.
|
This is now merged to master. |
Oops... that was a missing whitespace delimiter in that long format between the type and the name/full path; so both were conflated into what appeared to be one single field like This is now fixed. |
BTW you can easily look into a cache file, even if it's gzipped: Just use |
Fun fact: That whole thing moved the fields of the affected lines one position up, so some other was interpreted as the size; and |
Well, it's there in that directory, so of course it will be listed. And yes, of course this is just a snapshot in time, and a moment later the size may be different; like with all files on a modern OS. |
Hi.
It would be great to have the option for qdirstat-cache-writer to have the option of storing uid, gid and permissions in the cache file. The use-case is a large shared filesystem where you typically want to know who owns the largest files/folders after identifying them, and where generating the cache file ahead of time via cron is necessary to load the tree in a reasonable time.
thanks,
Jon
The text was updated successfully, but these errors were encountered: