HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

xml list — List a directory's contents (like `ls`) in XML format. More information: <https://xmlstar.sourceforg

Submitted by: @import:tldr-pages··
0
Viewed 0 times
directorycommandcontentslikeclixml listlistxml

Problem

How to use the xml list command: List a directory's contents (like ls) in XML format. More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139535968>.

Solution

xml list — List a directory's contents (like ls) in XML format. More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139535968>.

Write the current directory's listing to an XML document:
xml {{[ls|list]}} > {{path/to/dir_list.xml}}


Write the specified directory's listing to an XML document:
xml {{[ls|list]}} {{path/to/directory}} > {{path/to/dir_list.xml}}


Display help:
xml {{[ls|list]}} --help

Code Snippets

Write the current directory's listing to an XML document

xml {{[ls|list]}} > {{path/to/dir_list.xml}}

Write the specified directory's listing to an XML document

xml {{[ls|list]}} {{path/to/directory}} > {{path/to/dir_list.xml}}

Display help

xml {{[ls|list]}} --help

Context

tldr-pages: common/xml list

Revisions (0)

No revisions yet.