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!
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.
hi,
I need do a scan into my fileserver, and I want that the output goes to a file, then I can built a grafic line with the informmations.
I need do a sort file by their last access, like this:
files that have been accessed into 30days, 30 to 90, 90 to 365 and so one, I need this in order to know how long a file have not been acessed and how much space it consume.
Another sort should be: sort files by their time modification, I need know how much files people handle (make changes) into 30 days, 30 to 90days ...etc..
Please may you help on this?
I know that is something possible with ls command, but I could understand so goot the parameters..
Another nice statistic would be the duplicate files into my file server..
I'm using Fedora distro.
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625
Rep:
Probably the easiest way to do this is with find, e.g. to find all files in directory /foo and its subdirectories) that have been modified more than 10 days ago:
find /foo -mtime +10 -print
If you want to see how much space the file is taking up substiture -ls for -print in the above command, which will give you output like ls -lids for each file it finds. The field right before the modification date is the size of the file. You can also direct find to report files having a certain size with the -size option. You should read the man page for find -- there are a lot of options which you should find helpful.
Probably the easiest way to do this is with find, e.g. to find all files in directory /foo and its subdirectories) that have been modified more than 10 days ago:
find /foo -mtime +10 -print
If you want to see how much space the file is taking up substiture -ls for -print in the above command, which will give you output like ls -lids for each file it finds. The field right before the modification date is the size of the file. You can also direct find to report files having a certain size with the -size option. You should read the man page for find -- there are a lot of options which you should find helpful.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.