LinuxCommandLibrary

gvfs-info

Display information about files using GIO

SYNOPSIS

gvfs-info [OPTION...] [LOCATION...]

PARAMETERS

--help
    Shows the help message for the command, detailing available options and usage.

--version
    Displays the version information of the gvfs-info utility.

--attributes=ATTRIBUTES
    Specifies a comma-separated list of attributes to query. Attributes can be defined with namespaces (e.g., standard::*, etag::hash, unix::mode). Using * will query all available attributes.

--query-filesystems
    Queries and displays information about all currently mounted GVfs filesystems. When this option is used, no LOCATION argument is required.

--filesystem
    When used in conjunction with a LOCATION, this option queries and displays information specifically about the GVfs filesystem to which the given LOCATION belongs, rather than the LOCATION (file or directory) itself.

DESCRIPTION

gvfs-info is a command-line utility designed to query and display detailed information about files, directories, or specific GVfs URI schemes. It forms an integral part of the GVfs (GNOME Virtual File System) framework, which provides a userspace virtual filesystem layer over various backends such as local filesystems, SFTP, SMB, MTP devices, and more.

This command empowers users to inspect a wide range of properties, including standard file attributes like type, size, and modification dates, as well as more specific GVfs attributes such as content type, display name, and mount-related information for remote locations. It is particularly valuable for developers, system administrators, and advanced users who need to understand how GVfs interprets and manages different URI types, offering a programmatic method to retrieve metadata that is often displayed by graphical file managers like Nautilus.

CAVEATS

The functionality of gvfs-info is contingent upon the GVfs daemon being actively running. Querying remote URIs necessitates proper network connectivity and, in many cases, valid authentication credentials. The output can become quite extensive, particularly when querying all attributes using wildcards like *, which may include internal or less commonly used GVfs metadata. Incorrectly formatted URIs will result in errors.

GVFS URIS

GVfs URIs are specialized strings that identify resources managed by the GVfs framework, similar in concept to standard URLs. They can point to local files (e.g., file:///home/user/document.txt) or a multitude of remote locations (e.g., sftp://user@host/path/, mtp://[usb:001,005]/). A clear understanding of GVfs URI formatting is essential for the effective use of gvfs-info.

ATTRIBUTES AND NAMESPACES

GVfs organizes extensive metadata into attributes. These attributes are logically grouped within namespaces, such as standard (basic file info), time (timestamps), owner (user/group), unix (POSIX permissions), and xattr (extended attributes). When using the --attributes option, you can specify individual attributes (e.g., standard::name, time::modified) or use wildcards to retrieve all attributes within a namespace (e.g., standard::*) or all attributes universally (*). This mechanism provides granular control over the displayed information.

NOTE ON 'GIO INFO'

While gvfs-info specifically targets GVfs URIs, the more general-purpose gio info command from the GIO library often provides similar or even broader functionality. gio info can query GIO URI types directly and is frequently the preferred tool for general file information queries within the GNOME environment, as it sits at a higher abstraction layer.

HISTORY

gvfs-info is a component of the GNOME Virtual File System (GVfs) project, which emerged as a modern successor to the older GnomeVFS framework. GVfs was developed to provide a robust and extensible abstraction layer for diverse filesystems—ranging from local and network shares to virtual devices like MTP. It leverages a D-Bus based architecture for inter-process communication. This command has been a foundational part of the GVfs toolkit since its initial iterations, enabling programmatic access to the rich metadata and properties managed by GVfs for various URI schemes.

SEE ALSO

gvfs(7), gvfs-ls(1), gvfs-cat(1), gvfs-mount(1), gvfs-set-attribute(1), gio(1)

Copied to clipboard