LinuxCommandLibrary

ntfs-3g.probe

Check if a device is an NTFS volume

SYNOPSIS

ntfs-3g.probe DEVICE

PARAMETERS

DEVICE
    The block device to probe, e.g., /dev/sda1.

DESCRIPTION

The `ntfs-3g.probe` command is a helper utility used by automounting systems (like udev or pmount) to determine if a block device contains an NTFS file system that can be mounted using the `ntfs-3g` driver. It doesn't actually mount anything; it only *probes* the device to ascertain its file system type. It performs checks on the device to determine if it's a valid NTFS volume and returns an exit code indicating the result. A return value of 0 indicates that an NTFS file system was detected, while a non-zero return value indicates that either no NTFS was found or an error occurred. This utility is crucial for automatically mounting NTFS partitions when a device is connected to the system. By detecting the volume it can then trigger the mount action. Using `ntfs-3g.probe` avoids attempting to mount non-NTFS partitions with the NTFS-3G driver, which could lead to errors or even data corruption. Its simplicity and focused functionality make it a robust and reliable tool for automatically managing NTFS volumes on Linux systems.

CAVEATS

This command only probes for the NTFS file system type. It does not mount, unmount, repair, or perform any other operations on the volume. Incorrect device specification can lead to unexpected errors, so always confirm the device's correct path before running the command.

EXIT CODES

  • 0: NTFS file system detected.
  • Non-zero: No NTFS file system detected or an error occurred.

USAGE EXAMPLE

To check if /dev/sdb1 is NTFS:
ntfs-3g.probe /dev/sdb1

HISTORY

The `ntfs-3g.probe` command was developed as part of the NTFS-3G project, which aims to provide reliable read-write support for NTFS file systems on Linux and other Unix-like systems. It was introduced to improve the automatic detection and mounting of NTFS partitions, making it easier for users to access data on Windows-formatted drives.

SEE ALSO

ntfs-3g(8), mount(8), umount(8)

Copied to clipboard