UDFINFO(1) | General Commands Manual | UDFINFO(1) |
udfinfo — show information about UDF filesystem
udfinfo [ options ] device
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.
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)
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)
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.
udfinfo returns 0 if successful, non-zero if there are problems like a block device does not contain UDF filesystem.
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:
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:
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.
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.
Pali Rohár <pali.rohar@gmail.com>
udfinfo is part of the udftools package since version 2.0 and is available from https://github.com/pali/udftools/.
udftools | Commands |