LinuxCommandLibrary

gvfs-mkdir

Create directories on GVFS mounts

SYNOPSIS

gvfs-mkdir [OPTION...] LOCATION...

PARAMETERS

-p, --parents
    Create parent directories as needed

-h, --help
    Show help information

--version
    Print version information and exit

DESCRIPTION

gvfs-mkdir is a utility from the GVFS (GNOME Virtual File System) package designed to create directories on both local and remote filesystems supported by GVFS backends. GVFS enables access to virtual locations via URIs for protocols like FTP, SFTP, SMB/CIFS, WebDAV, NFS, Google Drive, and others.

Unlike traditional mkdir, which operates only on local paths, gvfs-mkdir uses URIs (e.g., smb://server/share/dir) to target remote or virtual mounts. It integrates seamlessly with GNOME environments, powering file operations in Nautilus and other apps via the GVFS daemon (gvfsd).

The command supports multiple directories in one invocation and the -p option to create parents recursively, mirroring mkdir -p. It fails if the target location is not GVFS-accessible or if permissions are insufficient. No mode-setting option exists; directories get default permissions.

Primarily for desktop users and scripts needing cross-protocol directory creation without manual mounting. Requires gvfsd running and FUSE support for user-space mounts.

CAVEATS

Requires GVFS daemon (gvfsd) running.
Only GVFS-supported URIs/backends.
No mode/permission setting like mkdir -m.
Fails silently on unsupported schemes.

EXAMPLES

gvfs-mkdir ftp://user@host/pub/newdir
gvfs-mkdir -p smb://server/share/a/b/c
gvfs-mkdir trash:///testdir

HISTORY

Part of GVFS since version 0.1.4 (2008); evolved with GNOME VFS replacement for FUSE-based virtual FS support.

SEE ALSO

mkdir(1), gvfs-ls(1), gvfs-rmdir(1), gvfs-mount(1), gio(1)

Copied to clipboard