Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
it would be easy to write a script to list out several largest files in a given tree. this can even be done in a one line command by those well experienced with their shell. BTDT.
i am looking for a script that, given an optional time duration and the tree path(s), will list out the fastest growing files in those trees, in slow to fast order, with the size change (over the duration) and current size on the same line as the file. i'm too lazy in my retirement to write one myself.
most preferred are scripts implemented in bash, pike, python, or rust. giving the total growth rate at the end of the list would be a nice plus.
there is no such thing, so if you need that you need to implement it yourself.
From the other hand "fastest growing file" is not really well defined, so hard to handle. Usually files are overwritten, so the size will change in steps (but in such cases sometimes the inodes change too). Sometimes they are renamed. Sometimes they are kept open and continuously grow, but probably you won't recognize it as long as they are not really saved.
Regarding the growth of scripts and similar things usually we use a version control system and that will make it easier - for the managed files.
But why not let a basic script write name, size, date to csv-files? Could be a cron job.
Then import these csv-files into a spreadsheet, sort the data and all kinds of diagrams, charts and what not is at your disposal...
and it also seems to be about people who don't comprehend what they read.
i no longer care to carry out a development project (i'm retired). many times when i did (cared and carried out) i discovered that someone else already did it and such software was already available, often free and open source. now days, the wise move is to first look for what might already exist. and i still find the Google and Duckduckgo fail to find what can be found (or at least search hints provided) by some of the more friendly people on LQ.
i no longer care to carry out a development project (i'm retired). many times when i did (cared and carried out) i discovered that someone else already did it and such software was already available, often free and open source.
That part is completely acceptable. Why do you (or we) want to implement anything if it was already done?
Quote:
Originally Posted by Skaperen
now days, the wise move is to first look for what might already exist. and i still find the Google and Duckduckgo fail to find what can be found (or at least search hints provided) by some of the more friendly people on LQ.
In this special case it looks like the tool does not exist and also it looks like it is only you who need it. So (from my side) you need to start to implement it and this LQ community will help you, but do not expect anybody will do it for you.
From the other hand it looks like the usual xy problem for me. Why do you need it, what do you want to achieve at all?
now days, the wise move is to first look for what might already exist. and i still find the Google and Duckduckgo fail to find what can be found (or at least search hints provided) by some of the more friendly people on LQ.
Searching first has always been what should be done - and if you don't find and decide to start a thread, explicitly include the search terms you used in your first post.
This both demonstrates that you've made some effort and it helps the next person to use those terms.
That part is completely acceptable. Why do you (or we) want to implement anything if it was already done?
i would not want to if the existing one met my needs. if it was close, i might adapt it to meet my needs. i suspect you and others might do similar.
i don't know of anything along this line that is done. for other reasons, i'd rather not make the effort to implement such a thing (although it is not entirely ruled out). these reasons apply to pretty much any project.
Quote:
Originally Posted by pan64
In this special case it looks like the tool does not exist and also it looks like it is only you who need it. So (from my side) you need to start to implement it and this LQ community will help you, but do not expect anybody will do it for you.
From the other hand it looks like the usual xy problem for me. Why do you need it, what do you want to achieve at all?
as to the xy problem, i am not expecting anyone to do it for me. i am merely looking to see if it has already been done. and i agree it looks like it does not exist. i ask as a final check because my search skills are not 100%. there has been more than one case of software i was looking for found by asking that searching did not find, often because of different terms likely due to different perspectives on the problem, or other search failure modes.
These are two of the more interesting hits my search got.
these are good links. thanks! i remember seeing that first one or one like it but passed it over as just useful for implementing a script. if i do implement something, it can be a good source of info, though i would not follow it exactly (i would not want the script to write any file). filtering by time of last writing (a file last written a much earlier is of less interest) makes sense as does file size (small files are likely of lesser concern compared to large files).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.