gvfs-copy
Copy files using GVFS
SYNOPSIS
gvfs-copy [OPTION...] SOURCE... DESTINATION
PARAMETERS
-i, --interactive
Prompt before overwriting an existing destination file.
-f, --force
Overwrite existing destination files without prompting (overrides -i).
-n, --no-clobber
Do not overwrite an existing file; exit with an error if the destination already exists.
-P, --no-progress
Do not display progress information during the copy operation.
--help
Display a help message and exit.
--version
Display version information and exit.
DESCRIPTION
gvfs-copy is a command-line utility that is part of the GVfs (GNOME Virtual File System) suite. It allows users to copy files and directories to or from various locations, including local filesystems and remote resources accessed via GVfs backends. Unlike standard tools like cp, gvfs-copy can directly handle URIs (Uniform Resource Identifiers) such as sftp://, smb://, ftp://, dav://, or mtp://.
This capability makes it ideal for interacting with network shares, MTP devices, or other virtual filesystems supported by GVfs without requiring them to be traditionally mounted beforehand. It transparently handles authentication and connection details managed by GVfs, providing a consistent way to manage files across diverse storage types within the GNOME environment and beyond. It supports recursive copying for directories and offers options for handling existing destination files.
CAVEATS
gvfs-copy relies on GVfs backends being installed and properly configured for remote protocols. Its performance and available features can vary depending on the specific GVfs backend used (e.g., a slow network connection for SFTP). While it mimics cp, it does not support all its options (e.g., preserving all attributes like -a, or creating hard/symbolic links), as these capabilities are often backend-dependent or not relevant to virtual filesystems. Authentication for remote resources is handled by GVfs's integrated credential management (e.g., GNOME Keyring) rather than direct command-line prompts for passwords.
URI SUPPORT
The most significant distinction of gvfs-copy is its ability to accept URIs as source and destination paths. This allows direct interaction with network shares (e.g., smb://, sftp://, ftp://), MTP devices (mtp://), and other virtual filesystems without the need for explicit mounting via the traditional mount command. The URI format ensures that protocol-specific details are handled transparently by the appropriate GVfs backend, simplifying cross-protocol file operations.
INTEGRATION WITH GNOME
As an integral part of the GVfs suite, gvfs-copy seamlessly integrates with the GNOME desktop environment's file management capabilities. It leverages GNOME's sophisticated credential management system for remote authentications, providing a consistent and secure user experience for file operations across both local and remote resources within the GNOME ecosystem.
HISTORY
GVfs was introduced as a major component of GNOME 2.22 (released in 2008) to replace the older and less flexible GnomeVFS. Its primary goal was to provide a more modular, robust, and extensible virtual filesystem layer built upon GIO (Glib Input/Output). gvfs-copy is one of the core command-line utilities developed as part of this transition, offering a familiar cp-like interface tailored to interact with GVfs-managed resources. It has since evolved alongside the GNOME desktop, benefiting from improvements in GVfs's stability and expanding support for various network and virtual filesystem protocols.