Command Line – Difference Between gvfs Commands and Common Commands

command linegvfs

I recently found the following gvfs commands :

gvfs-cat (1)         - Concatenate files
gvfs-copy (1)        - Copy files
gvfs-info (1)        - Show information about files
gvfs-ls (1)          - List files
gvfs-mime (1)        - Get or set mime handlers
gvfs-mkdir (1)       - Create directories
gvfs-monitor-dir (1) - Monitor directories for changes              
gvfs-monitor-file (1) - Monitor files for changes
gvfs-mount (1)       - Mounts the locations
gvfs-move (1)        - Copy files
gvfs-open (1)        - Open files with the default handler
gvfs-rename (1)      - Rename a file
gvfs-rm (1)          - Delete files
gvfs-save (1)        - Save standard input
gvfs-set-attribute (1) - Set file attributes
gvfs-trash (1)       - Move files or directories to the trash
gvfs-tree (1)        - List contents of directories in a tree-like format

Now, how do these differ by the common commands like cat, cp, mkdir, etc.

In other words what is the difference between the following commands respectively:

  • cat and gvfs-cat
  • cp and gvfs-copy
  • mkdir and gvfs-mkdir etc. and so on.

or what for gvfs-* commands stands for?

Best Answer

gvfs-... type commands can process remote locations based on a url.

From man gvfs-cat:

gvfs-cat works just like the traditional cat utility, but using gvfs locations instead of local files: for example you can use something like smb://server/resource/file.txt as location.


For instance

You can use gvfs-cat to do the following:

gvfs-cat smb://server/resource/file.txt

But cat can only be used to do this:

$ cat /path/to/some/file.txt

cat can only access local files, making it useful for local drive lookups. gvfs-cat is used for remote lookups with a valid GVFS url.