LinuxCommandLibrary

gvfs-ls

List files on GVFS volumes

SYNOPSIS

gvfs-ls [OPTION...] [LOCATION...]

PARAMETERS

-l, --long
    Use a long listing format, showing permissions, owner, group, size, and modification time.

-a, --all
    Do not ignore entries starting with '.' (dot files).

-A, --almost-all
    Do not list implied '.' and '..' entries.

-h, --human-readable
    With -l, print sizes in human readable format (e.g., 1K, 234M, 2G).

-d, --directory
    List directory entries themselves, rather than their contents.

-F, --classify
    Append an indicator (one of */=>@|) to entries: * for executables, / for directories, = for sockets, > for whiteouts, @ for symbolic links, | for FIFOs.

-R, --recursive
    List subdirectories recursively.

-n, --numeric-uid-gid
    Like -l, but list numeric user and group IDs.

-Q, --quote-name
    Enclose entry names in double quotes.

-s, --size
    Print the allocated size of each file, in blocks.

-t
    Sort by modification time, newest first.

-S
    Sort by file size, largest first.

-U
    Do not sort; list entries in directory order.

-X
    Sort alphabetically by entry extension.

-1
    List one entry per line.

-v, --verbose
    Display extra debugging information.

--version
    Show version information and exit.

--help
    Show a help message and exit.

DESCRIPTION

The gvfs-ls command is a utility from the GNOME Virtual File System (GVFS) suite, designed to list the contents of directories or locations specified by Uniform Resource Identifiers (URIs). GVFS itself is a user-space virtual file system that integrates various remote or special file systems directly into the GNOME desktop environment, making them accessible as if they were local files. This includes protocols like FTP, SFTP, SMB/CIFS, WebDAV, MTP, and more.

gvfs-ls functions similarly to the standard ls command but extends its capabilities to handle network locations and other non-local resources that GVFS supports. Instead of traditional file paths, it accepts URIs as arguments (e.g., sftp://user@host/path/, smb://server/share/, ftp://example.com/). This allows users to browse and list directories on remote servers, network shares, or even portable devices without needing to explicitly mount them beforehand. It's an essential tool for interacting with the diverse range of virtual file systems managed by GVFS from the command line.

CAVEATS

gvfs-ls relies heavily on the availability and correct configuration of GVFS backends. Network connectivity is essential for accessing remote URIs, and performance can vary significantly based on network conditions and the responsiveness of the remote server. Authentication might be prompted or fail if the necessary credentials are not provided or previously stored. While it can list local files, gvfs-ls is generally slower than the standard ls command for such operations as it goes through the GVFS layer.

GVFS URIS

GVFS uses Uniform Resource Identifiers (URIs) to specify locations, which allows it to address files and directories across diverse protocols and services. Unlike traditional file paths, URIs specify the protocol (e.g., ftp://, sftp://, smb://, dav://, mtp://), followed by the network location and optional path within that location. For instance, sftp://user@example.com/home/user/documents/ would point to a 'documents' directory on a remote SFTP server, while smb://server/share/ would refer to a network share. This standardized approach enables gvfs-ls to list contents from a wide array of sources, abstracting away the underlying network complexities.

HISTORY

gvfs-ls is part of the GVFS project, which was developed as a modern replacement for the older gnome-vfs in the GNOME desktop environment. GVFS made its debut with GNOME 2.22 in 2008, bringing a more robust, asynchronous, and flexible virtual filesystem layer built upon GIO (Gnome Input/Output). The gvfs- utilities, including gvfs-ls, were created to provide command-line access to these new capabilities, allowing users to interact with various network protocols and virtual file systems that are seamlessly integrated into the GNOME desktop.

SEE ALSO

ls(1), gvfs(7), gvfs-cat(1), gvfs-copy(1), gvfs-move(1), gvfs-trash(1), gvfs-mount(1), gio(1)

Copied to clipboard