4

HI all,

Is there a linux command which will output the structure of a given directory as XML? if there is, that would be awesome.

Thanks very much

Jamie
  • 213

4 Answers4

8

You can do this by using 'tree' command.

tree -X <dir>
0

As far as I know there is no standard linux command to do the job, but google-ing I found that there is a free multi platform: xml-directory-listing

Unfortunately it is written in Java.

drAlberT
  • 11,099
0

You could easily write a script for that, using languages such as Perl, Python or Ruby should do well.

raphink
  • 13,027
0

XMLStarlet will do this.

xml ls
Pablo A
  • 210
mfinni
  • 36,892