Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vi/execfuse
Turn a bunch of scripts into a FUSE filesystem
https://github.com/vi/execfuse
bash fuse fuse-filesystem shell-scripts
Last synced: 12 days ago
JSON representation
Turn a bunch of scripts into a FUSE filesystem
- Host: GitHub
- URL: https://github.com/vi/execfuse
- Owner: vi
- License: other
- Created: 2013-07-13T02:14:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-15T19:53:49.000Z (3 months ago)
- Last Synced: 2024-10-16T13:01:16.706Z (28 days ago)
- Topics: bash, fuse, fuse-filesystem, shell-scripts
- Language: C
- Homepage:
- Size: 64.5 KB
- Stars: 29
- Watchers: 6
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
execfuse is a implement FUSE filesystems using a bunch of scripts.
Consider it as a "shell FUSE binding".
For each FUSE call (except of ones that deals with file descriptors)
execfuse calls your script. For opening files it provides a bit higher
level abstraction: "read_file" script is called when file should be read
and "write_file" is called when file should be saved.Example:
$ mkdir -p m
$ ./execfuse examples/xmp m
$ ls -l m/bin/sh
lrwxrwxrwx 1 root root 4 Mar 26 00:26 m/bin/sh -> bash
(executes "examples/xmp/readlink /bin/bash" for this)
$ ls m/etc/iproute2/
ematch_map group rt_dsfield rt_protos rt_realms rt_scopes rt_tables
(executes "exampels/xmp/readdir /etc/iproute" for this)
$ m/bin/echo qqq
qqq
$ mkdir -p m/tmp/1/2/3
$ echo 12345 > m/tmp/12345
(executes "exampels/xmp/write_file /tmp/12345" with content piped to stdin)
$ rm -Rf m/tmp/1*
$ fusermount -u mLimitations:
* Each file must fit in memory, can't write/read part of file
* Slow by design
* Limited error handling, especially for writing files
* Modifications to files are visible only after file closingFilesystem examples:
* `examples/xmp` - try to be fusexmp_fh
* `examples/hello` - very simple demo filesystem
* `examples/video_frames` - extract frames from video as `*.ppm` files and enumerate keyframes (using ffmpeg)