Jump to content

How to read directory contents


himanshu.rawat

Recommended Posts

Hi All,

Is there a way to read directory recursively and its contents? Below sample example can provide more details on my objective.

Directory : /opt/opennms/share/rrd/snmp/2 , following directories are created

ls -DR umOrgIndex/

umOrgIndex/:
0  101  103  107  111  112  115  119

umOrgIndex/0:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/101:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/103:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/107:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/111:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/112:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/115:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

umOrgIndex/119:
strings.properties  umOrgMsgsDiskUsage.jrb  umOrgMsgsSize.jrb

Next I was trying to use them in reports ( jrxml ). Reports will be having rows/columns like below

Org Id     /         Org Name                 /           Org Disk Usage                          / Org Message Size

0                       test.com                                   45 %                                                   300

101                   test2.com                                  75 %                                                   450

103                   test3.com                                  20 %                                                   100

For jrb files, I will use query string as "jrobin".

string.properties have org name like test.com, test2.com etcetera.

Please tell me how it can be done.

Thanks in advance.

Regards,

Rawat

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...