Questo contenuto non è disponibile nella lingua selezionata.

15.8. GVFS Tools and xdg-utils in GNOME


GVFS ships with several commands that may come useful for scripting or testing. A set of POSIX commands counterparts is offered:
  • gvfs-cat
  • gvfs-less
  • gvfs-mkdir
  • gvfs-mount
  • gvfs-rename
  • gvfs-set-attribute
  • gvfs-copy
  • gvfs-ls
  • gvfs-move
  • gvfs-rm
  • gvfs-trash
  • gvfs-info
  • gvfs-save
  • gvfs-tree
Some more additional commands are provided for more control of GVFS specifics:
  • gvfs-monitor-dir
  • gvfs-monitor-file
  • gvfs-mime
  • gvfs-open
All these commands are native GIO clients, there is no need for the fallback FUSE daemon to be running. Their purpose is not to be drop-in replacements for POSIX commands, in fact, a very little range of switches is supported. In their basic form, an URI string (instead of a local path) is taken as an argument.
This all allows GNOME to be well-supported within xdg-tools (a freedesktop.org interoperability project). For example, the commonly used xdg-open actually calls gvfs-open when a running GNOME session is detected, reading file type associations from the correct location.
The following are a few examples of the GVFS commands usage:
  • To lists all files in /tmp on a local file system, execute:
      $ gvfs-ls file:///tmp
  • The command below lists contents of a text file from a remote machine:
      $ gvfs-cat ssh://joe@ftp.myserver.net/home/joe/todo.txt
  • To copy the referenced text file to a local /tmp directory, run:
      $ gvfs-copy ssh://joe@ftp.myserver.net/home/joe/todo.txt /tmp/

Note

For user convenience, bash completion is provided as a part of the package.
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.