LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2006, 06:32 PM   #1
teresa
LQ Newbie
 
Registered: Feb 2004
Posts: 4

Rep: Reputation: 0
Filesystem/Directory statistics


Dear linuxquestion.org users,

I'm looking for an application that extracts useful statistics from my filesystem or a given directory.

Ideally, it should report things like this for the whole FS/Dir :

- Average file size
- Average directory size
- Average lenght of file names
- Average lenght of directory names
- Average number of files per directory
- Average depth of the files

And so on ...

Does anybody know any app/script that can do that ?

Thanks,
Teresa
 
Old 02-24-2006, 06:45 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I think some of those things can be found using df and du. Maybe the wc command. Maybe there's some predefined bash variables that will know the filename length.

Look at this thread. Then experiment with your own script...
 
Old 02-24-2006, 07:46 PM   #3
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
Teresa,

Like pljvaldez suggested you can use df and du but since you want to "save" the records you can use the following command:
df > df_data.txt and/or du > du_data.txt
You then get a text file that contains info like this:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 2939744 1178744 1761000 41% /
none 256884 0 256884 0% /dev/shm
/dev/hdb1 19550532 3034784 16515748 16% /mnt/data1
/dev/hda3 4891620 1267120 3624500 26% /opt
/dev/hda5 4891556 1162272 3729284 24% /usr
/dev/hda6 16610624 582472 16028152 4% /home
/dev/hda7 9277216 4340660 4936556 47% /hip
//spitfire/public 6040192 4182400 1857792 70% /home/ralvez/public

Hope this helps.

Rick
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 10:35 PM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Are there any browser statistics for LQ? MartinN LQ Suggestions & Feedback 3 09-21-2004 08:34 AM
lm_sensros statistics JJX Linux - Newbie 0 04-24-2004 04:25 PM
Squid statistics Padre Linux - Software 4 12-11-2003 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration