Linux command
gio 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Open
gio open [path/to/file]
List
gio list [path/to/directory]
Example
gio info [path/to/file]
Copy
gio copy [path/to/source] [path/to/destination]
Example
gio trash [path/to/file]
Launch
gio launch [path/to/file].desktop
说明
gio is the GIO command-line tool for file operations in GNOME-based systems. It provides a unified interface for both local files and virtual filesystems (GVfs), including network locations, trash, and removable media. Unlike standard Unix commands, gio integrates with GNOME's infrastructure, respecting desktop settings for default applications, trash behavior, and virtual filesystem mounts. It can access locations like smb://, sftp://, mtp://, and trash://.
参数
- open _FILE_
- Open file with default application
- list _DIR_
- List contents of directory
- info _FILE_
- Display information about a file
- copy _SRC_ _DEST_
- Copy files
- move _SRC_ _DEST_
- Move files
- trash _FILE_
- Move file to trash
- remove _FILE_
- Delete file permanently
- cat _FILE_
- Display file contents
- launch _DESKTOP_
- Launch application from .desktop file
- mime _FILE_
- Get or set MIME type handler
- mount _LOCATION_
- Mount a location
FAQ
What is the gio command used for?
gio is the GIO command-line tool for file operations in GNOME-based systems. It provides a unified interface for both local files and virtual filesystems (GVfs), including network locations, trash, and removable media. Unlike standard Unix commands, gio integrates with GNOME's infrastructure, respecting desktop settings for default applications, trash behavior, and virtual filesystem mounts. It can access locations like smb://, sftp://, mtp://, and trash://.
How do I run a basic gio example?
Run `gio open [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does open _FILE_ do in gio?
Open file with default application