LinuxCommandLibrary

ntfscp

Copy files to NTFS volumes

SYNOPSIS

ntfscp [OPTIONS] SOURCE DESTINATION
ntfscp [OPTIONS] SOURCE... DIRECTORY

PARAMETERS

-a, --archive
    Preserve all attributes, including permissions, timestamps, ownership, and extended attributes. This option implies -dRPr and -t.

-d, --no-dereference
    Do not dereference symbolic links. Copy the symbolic link itself rather than the file it points to.

-f, --force
    Overwrite existing files in the destination without prompting.

-i, --interactive
    Prompt before overwriting an existing file.

-p, --preserve
    Preserve file mode (permissions), ownership, and timestamps.

-r, -R, --recursive
    Copy directories and their contents recursively.

-t, --alternate-data-streams
    Copy alternate data streams (ADS) to separate files. For example, file:stream will be copied as file.stream.

-v, --verbose
    Explain what is being done during the copy process.

-h, --help
    Display a help message and exit.

-V, --version
    Output version information and exit.

DESCRIPTION

ntfscp is a utility from the ntfs-3g project designed for copying files and directories from an NTFS volume to a Linux filesystem. Unlike standard cp, ntfscp is specifically tailored to handle the complexities of NTFS, including preserving file permissions, timestamps, alternate data streams (ADS), hard links, and reparse points (such as symbolic links and junctions).

It aims to provide a more faithful copy when migrating data from an NTFS volume, ensuring that NTFS-specific metadata is either preserved or correctly translated to the target Linux filesystem where possible. This makes it particularly useful for backup or migration scenarios where maintaining data integrity and attributes from the NTFS source is crucial. It requires the NTFS volume to be mounted, typically using ntfs-3g.

CAVEATS

ntfscp requires the NTFS volume to be mounted, typically using the ntfs-3g driver.
It is designed to copy files from an NTFS volume, not to an NTFS volume.
Not all NTFS-specific features (e.g., specific NTFS ACLs, encrypted files) can be perfectly translated or preserved on all Linux filesystems.
Alternate data streams are converted to separate files on the target filesystem, which might not be the desired behavior in all scenarios.
The target Linux filesystem should ideally support features like extended attributes, symbolic links, and hard links to fully leverage ntfscp's preservation capabilities.

USAGE CONTEXT

ntfscp is most valuable when performing data migration or backups from Windows systems where NTFS is the primary filesystem. Its strength lies in preserving NTFS-specific attributes and metadata, which is crucial for the integrity and functionality of the copied data on a Linux system, especially when dealing with complex file structures or applications.

HISTORY

ntfscp is an integral part of the ntfs-3g project, which began development in the early 2000s to provide robust read-write support for NTFS filesystems on Linux and other Unix-like operating systems. It was developed to address the limitations of earlier, less stable NTFS drivers.

ntfscp specifically emerged as a tool to correctly handle the intricacies of copying files from NTFS, ensuring that metadata fidelity was maintained beyond what a standard cp command could offer, given the fundamental differences between NTFS and POSIX filesystems. Its development has paralleled the continuous improvements in ntfs-3g's ability to interpret and manage NTFS attributes, making it a reliable choice for data migration from Windows environments.

SEE ALSO

cp(1), rsync(1), ntfs-3g(8), ntfsinfo(8)

Copied to clipboard