View Mac OSX File System details from terminal

By | September 13, 2019

Mac OSX storage have 4 different concepts: disk, formatting, partition and volume. Disk are the physical devices where data are kept.
Disk may be divided on several areas or partitions, every partition may contain own and be data partition as well. OSX may support up to 16 partitions per disk. OSX supports 2 main partition schemes: Apple Partition Map (APM) and GUID Partition Table (GPT) plus additional; partition scheme Master Boot Record (MBR).
When partition is created the volumes can be created as well inside this partition. The volume content include files and folders. What we are seeing in the Finder or terminal is actually volumes not a partition:

# ls -l /Volumes/
total 0
drwxr-xr-x 8 sshtest staff 340 Nov 23 2018 CLion
drwxr-xr-x@ 7 _unknown _unknown 238 Aug 30 2018 Firefox
lrwxr-xr-x 1 root wheel 1 Jun 14 10:18 Macintosh HD -> /
drwxr-xr-x@ 4 root wheel 128 Apr 16 2018 Recovery
drwxr-xr-x 6 root wheel 272 May 4 01:55 RecoveryHDMeta
drwxr-xr-x@ 11 _unknown _unknown 442 Sep 10 2018 Skype

Information about physical drive may be retrieved using system_profiler command with specific argument type for particular physical storage, for example:

# system_profiler SPSerialATADataType
SATA/SATA Express:

  Generic AHCI Controller:

    Vendor: Generic
    Product: AHCI Controller
    Physical Interconnect: PCI
    Description: AHCI Version 1.30 Supported

  VMware Virtual SATA Hard Drive:

    Capacity: 64.42 GB (64,424,509,440 bytes)
    Model: VMware Virtual SATA Hard Drive
    Revision: 1
    Serial Number: 1
    Native Command Queuing: Yes
    Queue Depth: 32
    Removable Media: No
    Detachable Drive: No
    BSD Name: disk0
    Medium Type: Solid State
    TRIM Support: No
    Partition Map Type: GPT (GUID Partition Table)
      Capacity: 209.7 MB (209,715,200 bytes)
      File System: MS-DOS FAT32
      BSD Name: disk0s1
      Content: EFI
      Volume UUID: 0E239BC6-F960-3107-89CF-1C97F78BB46B
      Capacity: 63.56 GB (63,564,750,848 bytes)
      Available: 28.11 GB (28,108,656,640 bytes)
      Writable: Yes
      File System: Journaled HFS+
      BSD Name: disk0s2
      Mount Point: /
      Content: Apple_HFS
      Volume UUID: 4B167209-055F-3268-B8C9-859976467F8D
    Recovery HD:
      Capacity: 650 MB (650,002,432 bytes)
      File System: Journaled HFS+
      BSD Name: disk0s3
      Content: Apple_Boot
      Volume UUID: BB66A7B6-D0B5-3064-8E84-ADC273B96ECC

or using diskutil, additionally diskutil gives partition and file system information. The example below shows Apple_HFS file system, which mean Apple Hierarchy File System:

# diskutil list
/dev/disk0 (internal, physical):
  #:    TYPE NAME              SIZE            
  0:   GUID_partition_scheme   *64.4 GB    disk0
  1:    EFI EFI    209.7 MB    disk0s1
  2:    Apple_HFS MacOS       3.6 GB        disk0s2
  3:    Apple_Boot Recovery HD  650.0 MB    disk0s3
/dev/disk2 (disk image):
  #:    TYPE NAME                          SIZE          IDENTIFIER
  0:   GUID_partition_scheme               +47.2 MB      disk2
  1:    Apple_HFS MyApp Installer   47.2 MB       disk2s1

/dev/disk3 (disk image):
  #:    TYPE NAME                          SIZE       IDENTIFIER
  0:   GUID_partition_scheme               +47.2 MB   disk3
  1:   Apple_HFS MyApp Installer    47.2 MB    disk3s1

Leave a Reply

Your email address will not be published. Required fields are marked *