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
XMLStarlet will do this.
You can do this by using 'tree' command.
tree -X <dir>
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.
You could easily write a script for that, using languages such as Perl, Python or Ruby should do well.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?