I suggest the proper command might be /usr/libexec/gvfsd-archive .
When you right-click a achive-file (eg. foo.tar.gz) and select "Open With Archive Mounter",
then you type:
Code:
ps aux | grep -i "foo.tar.gz"
and you would get:
Code:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
ly 16085 6.0 0.2 21672 4672 ? Sl 01:18 0:07 /usr/libexec/gvfsd-archive file=file:///home/ly/downloads/scrapbook.tar.bz2
type:
Code:
/usr/libexec/gvfsd-archive -h
will get:
Code:
Usage: /usr/libexec/gvfsd-archive key=value key=value ...
You'll find it's not necessary to convert the regular path into url as wolfgangmeyers described, and non-English charicters(eg. Chinese) are just fine(My locale is zh_CN.UTF-8).
It seems like quite awkward to use gvfsd-archive directly, so I write two shell-scripts(archmount,archumount) and linked them into /usr/local/bin/ by:
Code:
ln -s ~/.myscripts/archmount /usr/local/bin/
ln -s ~/.myscripts/archumount /usr/local/bin/
to make it a little easier for use in command-line.
Following are their breif help:
Code:
archmount is a user-script which makes gvfsd-archive a little easier to use for local archives in command-line.
archive-files are mounted into $HOME/.gvfs/ by gvfsd-archive's default action.
Usage:archmount <file_1> [file_2] [...] [file_n]
Regular expression is supported for the arguments.
Supported file types: iso images;tar (compressed) files;
Examples:
archmount foo/bar/foo.tar.gz foo1/foo2.tar.bz2
archmount foo/bar/f[0-9].tar.bz2
archmount foo/bar/foo.tar.{gz,bz2}
archmount foo/bar/*
archmount /foo/bar/foo.tar.gz
Code:
archumount is used to umount archives(in fact kill a gvfsd-archive process).
Usage:archumount <operation|parterns>
operations:
-h,--help show this help page
-l,--list list gvfsd-archive mounted files and their pids
-ka,--kill kill all gvfsd-archive processes.
parterns:
mounted-files or mount-pionts which are seprated by blank.
mounted-files can be listed by operations -l/--list.
Examples:
archumount -l
archumount foo.tar.gz
foo.tar.gz -ka
You can download the scripts here:
[By the way: My scripts don't support blank in file-name or path. I'm just about to learn shell-scripting, so you'd have to modify the scripts you yourself if you want to make them more flexible. Any advises are welcome here!]
Bookmarks