# udfinfo

## NAME



           udfinfo — show information about UDF filesystem
    


## SYNOPSIS



           **udfinfo [ options ]**_device_
    


## DESCRIPTION



           **udfinfo** shows various information about a UDF filesystem stored
           either on the block device or in the disk file image. The output
           from the **udfinfo** is suitable for parsing by external applications
           or scripts.
    


## OPTIONS



           **-h,--help**
                  Display the usage and the list of options.
    
           **-b,--blocksize=**_block-size_
                  Specify the size of blocks in bytes. Valid block size for a
                  UDF filesystem is a power of two in the range from _512_ to
                  _32768_ and must match a device logical (sector) size. If
                  omitted, **udfinfo** tries to autodetect block size. First it
                  tries logical (sector) size and then all valid block sizes.
    
           **--startblock=**_start-block_
                  Specify the block location where the UDF filesystem starts.
                  It is used for calculating the block location of the Volume
                  Recognition Sequence (32 kB after the start block) and the
                  first Anchor Volume Descriptor Pointer (256 blocks after
                  the start block).
    
                  Normally start block is _0_ , but for Multisession UDF optical
                  discs it is the block location where the last session of
                  Multisession UDF disc starts.
    
                  If omitted, **udfinfo** for optical disc tries to detect start
                  block of the last session from disc Table Of Contents.
                  Otherwise value _0_ is used.
    
                  For accessing some previous session of Multisession UDF
                  optical disc, it is required to specify correct block where
                  that previous session starts. And also to specify where
                  that session ends via **--lastblock** option.
    
                  For Multisession UDF disc images stored in file there is no
                  way to detect where the last session starts and therefore
                  it is necessary to specify the correct start block location
                  manually from the original optical disc Table Of Contents.
    
                  (Option available since udfinfo 2.3)
    
           **--lastblock=**_last-block_
                  Specify the block location where the UDF filesystem ends.
                  It is used for calculating the block location of second and
                  third Anchor Volume Descriptor Pointer (256 blocks prior
                  the last block and the last block itself).
    
                  Normally last block is _number of disk blocks minus one_ , but
                  for Multisession UDF optical discs when reading different
                  session than the last one (specified by **--startblock**) it is
                  the block location where the specified session ends.
    
                  If omitted, **udfinfo** for optical disc tried to detect the
                  last recorded block with fallback to the last block of
                  device or disk file image.
    
                  For accessing some previous session of Multisession UDF
                  optical disc, it is required to specify correct value for
                  both **--startblock** and **--lastblock** options.
    
                  (Option available since udfinfo 2.3)
    
           **--vatblock=**_vat-block_
                  Specify the block location of the Virtual Allocation Table.
                  Virtual Allocation Table is present only on UDF disks with
                  Virtual Partition Map and must be at the last
                  written/recorded disk block.
    
                  If omitted, **udfinfo** for optical disc tries to detect the
                  last recorded block with fallback to the last block of
                  block device or disk file image or block specified by
                  **--lastblock**. In most cases, this fallback does not have to
                  work and for disk file images with Virtual Allocation Table
                  it is necessary to specify the correct location.
    
                  Virtual Allocation Table contains locations of UDF disk
                  blocks needed to read data storage, determinate used and
                  free space blocks, read File Set Identifier and calculate
                  Windows-specific Volume Serial Number. Also, it contains
                  Logical Volume Identifier and overwrite previously stored
                  in Logical Volume Descriptor.
    
           **--locale**
                  Encode UDF string identifiers on output according to
                  current locale settings (default).
    
           **--u8** Encode UDF string identifiers on output to 8-bit OSTA
                  Compressed Unicode format without leading Compression ID
                  byte, which is equivalent to Latin1 (ISO-8859-1) encoding.
                  This will work only for strings which all Unicode code
                  points are below U+100.
    
           **--u16** Encode UDF string identifiers on output to 16-bit OSTA
                  Compressed Unicode format without leading Compression ID
                  byte, which is equivalent to UTF-16BE.
    
           **--utf8** Encode UDF string identifiers on output to UTF-8.
    


## EXIT STATUS



           **udfinfo** returns 0 if successful, non-zero if there are problems
           like a block device does not contain UDF filesystem.
    


## OUTPUT FORMAT



           First part of the **udfinfo** standard output contains information in
           _key_ =_value_ format. List of all keys with their meaning are in the
           following table:
    
                  _filename_
                         File name of the selected block device or disk file
                         image
    
                  _label_  label is an alias for _lvid_ , see udflabel(8) section
                         **UDF LABEL AND UUID**
    
                  _uuid_   UUID are first 16 hexadecimal lowercase digits of
                         _fullvsid_ , but see udflabel(8) section **UDF LABEL AND**
                         **UUID**
    
                  _lvid_   UDF Logical Volume Identifier stored in UDF Logical
                         Volume Descriptor
    
                  _vid_    UDF Volume Identifier stored in UDF Primary Volume
                         Descriptor
    
                  _vsid_   _fullvsid_ after _uuid_ part, typically 17.–127.
                         character
    
                  _fsid_   UDF File Set Identifier stored in UDF File Set
                         Descriptor
    
                  _fullvsid_
                         UDF Volume Set Identifier stored in UDF Primary
                         Volume Descriptor
    
                  _owner_  UDF Logical Volume Info1 stored in UDF
                         Implementation Use Volume Descriptor, represents
                         Owner name, person creating the medium or filesystem
                         (available since udfinfo 2.3)
    
                  _organization_
                         UDF Logical Volume Info2 stored in UDF
                         Implementation Use Volume Descriptor, represents
                         Organization name responsible for creating the
                         medium or filesystem (available since udfinfo 2.3)
    
                  _contact_
                         UDF Logical Volume Info3 stored in UDF
                         Implementation Use Volume Descriptor, represents
                         Contact information for the medium or filesystem
                         (available since udfinfo 2.3)
    
                  _appid_  UDF Application Identifier stored in UDF Primary
                         Volume Descriptor, identifies application that
                         created medium or filesystem (available since
                         udfinfo 2.3)
    
                  _impid_  UDF Developer Identifier stored in UDF
                         Implementation Identifier of UDF Primary Volume
                         Descriptor, uniquely identifies the implementation
                         which created medium or filesystem (available since
                         udfinfo 2.3)
    
                  _winserialnum_
                         Windows-specific Volume Serial Number
    
                  _blocksize_
                         UDF block size
    
                  _blocks_ Number of all blocks on the selected block device or
                         disk file image
    
                  _usedblocks_
                         Number of used space blocks on UDF disk for data
                         storage
    
                  _freeblocks_
                         Number of free space blocks on UDF disk for data
                         storage
    
                  _behindblocks_
                         Number of blocks which are behind the last block
                         used by UDF disk
    
                  _numfiles_
                         Number of stored files on UDF disk
    
                  _numdirs_
                         Number of stored directories on UDF disk
    
                  _udfrev_ UDF revision needed for reading UDF disk
    
                  _udfwriterev_
                         UDF revision needed for writing or modifying UDF
                         disk
    
                  _startblock_
                         Block location where the UDF filesystem starts
                         (visible only when non-zero, available since udfinfo
                         2.3)
    
                  _lastblock_
                         Block location where the UDF filesystem ends
                         (visible only when it is not same as the last block
                         on disk, available since udfinfo 2.3)
    
                  _vatblock_
                         Block location of the UDF Virtual Allocation Table
                         (visible only when available)
    
                  _integrity_
                         UDF integrity of Logical Volume, one of: _opened_ ,
                         _closed_ , _unknown_
    
                  _accesstype_
                         UDF Access Type, one of: _overwritable_ , _rewritable_ ,
                         _writeonce_ , _readonly_ , _pseudo-overwritable_ , _unknown_
    
                  _softwriteprotect_
                         Status of UDF SoftWriteProtect flag, either _yes_ or
                         _no_ (available since udfinfo 2.2)
    
                  _hardwriteprotect_
                         Status of UDF HardWriteProtect flag, either _yes_ or
                         _no_ (available since udfinfo 2.2)
    
           When UDF integrity is not _closed_ it means that the UDF disk was
           not properly unmounted, is in an inconsistent state and needs
           repairing.
    
           When either _softwriteprotect_ or _hardwriteprotect_ flag is set then
           UDF disk should be treated as read-only.
    
           All UDF string identifiers are stored on UDF disk in Unicode,
           therefore they are locale or code page agnostic. Options **--locale** ,
           **--u8** , **--u16** and **--utf8** controls how are identifiers encoded on
           output.
    
           All newline characters from the UDF string identifiers are
           removed, so it is guaranteed that the newline character is present
           only as a separator.
    
           Second part of the **udfinfo** standard output contains list of UDF
           block types stored on device, one per line in the following
           format:
    
                  start=_block-num_ , blocks=_block-count_ , type=_block-type_
    
           With meaning that _block-type_ starts at UDF block _block-num_ and
           span _block-count_ blocks on device.
    
           Windows-specific _Volume Serial Number_ is a non-standard 32-bit
           checksum, calculated as four separate 8-bit XOR checksums of 512
           bytes long UDF File Set Descriptor. Therefore, it cannot be set or
           changed as opposed to UUID which is 64-bit long. This non-standard
           checksum is used only by Windows systems (since Windows 98 era
           when it was introduced) and can be displayed on Windows systems by
           applications like **vol** , **dir** or **fsutil.exe**.
    


## LIMITATIONS



           **udfinfo** prior to version 2.3 was unable to handle Multisession UDF
           discs correctly. It always printed only information about the
           first session (the oldest one) and not about the last session (the
           most recent).
    
           **udfinfo** prior to version 2.2 was unable to print Unicode strings
           with code points above U+FFFF correctly.
    
           **udfinfo** prior to version 2.2 was unable to read Metadata
           Partition. Therefore, determining used and free space blocks,
           reading File Set Identifier and calculating Windows-specific
           Volume Serial Number did not have to be available or correctly
           calculated for disks with UDF revisions higher than 2.01 which had
           Metadata Partition.
    
           **udfinfo** prior to version 2.1 was unable to read Virtual Allocation
           Table stored outside of Information Control Block. Therefore above
           limitation applied also for some Write Once media.
    


## AVAILABILITY



           **udfinfo** is part of the udftools package since version 2.0 and is
           available from https://github.com/pali/udftools/.
    


* * *