Forrest logo
tool overview
On this page you find all important commands for the CLI tool mdls. If the command you are looking for is missing please ask our AI.

mdls

The "mdls" command line tool is a utility available on macOS systems. It stands for "metadata list" and is used to display metadata information about a file. When executed with a file name as an argument, "mdls" displays various attributes associated with that file. These attributes can include details about the file's creation and modification dates, file type, size, and more. The information shown by "mdls" is based on the metadata stored within Extended Attributes of files in macOS. Users can use "mdls" to view metadata about a specific file or use wildcards to search for and display metadata for multiple files. The output of "mdls" is presented in a key-value format, where each attribute is displayed along with its corresponding value. "mdls" is particularly useful for Mac users seeking to gather information about individual files or perform bulk operations based on file attributes.

List of commands for mdls:

  • mdls:tldr:02c39 mdls: Display the list of metadata attributes for file.
    $ mdls ${filename}
    try on your machine
    explain this command
  • mdls:tldr:70cec mdls: Display a specific metadata attribute.
    $ mdls -name ${attribute} ${filename}
    try on your machine
    explain this command
tool overview