LinuxCommandLibrary

gvfs-save

Save a file using the GVFS backend

SYNOPSIS

gvfs-save [OPTION...] [URI]

PARAMETERS

--help
    Display help information and exit

--version
    Output version information and exit

DESCRIPTION

The gvfs-save command is a utility from the GVFS (GNOME Virtual File System) package, part of the GNOME desktop environment's GIO library. It reads data from standard input (stdin) and saves it to a specified GVFS URI or via a graphical file chooser dialog.

GVFS extends traditional file operations to virtual filesystems, supporting protocols like SMB, FTP, WebDAV, Google Drive, and more. Without a URI argument, gvfs-save launches a GTK-based save dialog, allowing users to select filename, location, and handle overwrites or permissions interactively. This is ideal for shell scripts needing user-guided saves without embedding paths.

If a URI is provided (e.g., smb://server/share/doc.txt), it saves directly without prompting, enabling automation for remote or virtual locations. It respects desktop portals for sandboxed apps (e.g., Flatpak) and integrates with gvfsd daemon for backend handling.

Common use cases include piping command output: curl URL | gvfs-save for downloads, or script-generated reports. It requires a graphical session for dialogs; headless use defaults to direct save if URI given.

CAVEATS

Requires graphical environment (GTK/GNOME) for save dialog; fails silently or errors in headless/TTY mode without URI. Depends on running gvfsd daemon. Direct saves may prompt for credentials on remote URIs.

EXAMPLES

echo 'Hello World' | gvfs-save
Opens graphical save dialog.

wget -O - URL | gvfs-save smb://server/doc.pdf
Saves download directly to SMB share.

cat report.txt | gvfs-save
User chooses local/remote location.

SUPPORTED URIS

Local: file:///path/to/file
Remote: smb://host/share/file, ftp://user@host/path, google-drive://id
Special: trash:/// (moves to trash). See gvfs(1) for full list.

HISTORY

Introduced in GVFS 1.4 (2009) as part of gvfs-utils by the GNOME Project. Evolved with GIO to support modern portals (XDG Desktop Portal) since GVFS 1.26 (2015) for better sandbox integration.

SEE ALSO

gvfs-cat(1), gvfs-copy(1), gvfs-open(1), gio(1), zenity(1)

Copied to clipboard