5 ms·
Show HN: Bashfs – Run commands as your filesystem
- riquito 7y agoVisionary, it was fun to see
- jasonhansel 7y agoI worked on a semi-similar project, to let people turn bash scripts into FUSE filesystems: https://github.com/jasonhansel/microfs https://github.com/jasonhansel/microfs For example, this script is used to make a FS that turns the web into a filesystem, so reading /www.google.com/GET will show the Google homepage: https://github.com/jasonhansel/microfs/blob/master/http.sh https://github.com/jasonhansel/microfs/blob/master/http.sh
- threeme3 7y agomicrofs looks interesting to me, but unfortunately crashes with a SEGFAULT on Ubuntu 19.04: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7de88b8 in __GI__IO_fread (buf=buf@entry=0x7fffffffd4f0, size=size@entry=1, count=count@entry=1024, fp=0x0) at iofread.c:35
- jasonhansel 7y agoThis was a school project that only had to compile on one specific machine. I may rewrite it in Rust (probably with lots of new features) if there is interest.
- YesThatTom2 7y agoGo home, coder. You’re drunk!
- high_5 7y agoWhy not? :-D
- YesThatTom2 7y agoTo be clear... I live this. It’s must have been very fun to write and he learned a lot about writing a file system. Learning for the sake of learning is great!
- Hnrobert42 7y agoNo, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.
- BlackLotus89 7y agoQuote from the Readme: > Why not?
- IshKebab 7y agoThe "why not" is pretty obvious so that doesn't really answer the question. But anyway the "why" is equally obvious - for fun! There's no way anyone reasonable would consider this useful or even sane so it must just be for fun, or to learn about FUSE.
- PopeDotNinja 7y agoThey address this in the README. https://github.com/pcgrosen/bashfs#why https://github.com/pcgrosen/bashfs#why
- Dylan16807 7y agoI appreciate the attempt to help, but I disagree. The README "addresses" a question of "why?". But because that's not a real answer, it's not a valid response to "but really why?"
- chmod775 7y ago"Why not?" here is an idiom for "I know it serves little purpose but I did it for the fun of tinkering with stuff."
- Dylan16807 7y ago"Why not?" can mean a lot of different things. That's why it can be helpful to get an actual answer.
- tfowler 7y agoDon't see much difference than something like $ cat <(my_favorite_script)
- rambojazz 7y agoIs there any way this can be useful for something? Or is it just a fun experiment with FUSE?
- jarfil 7y agoPossibly the most useful part might be the patch to upstream pyfuse3 proposed by the author, and as a reference implementation for something similar that might be useful on itself.
- agucova 7y agoWe've come so far as a society, it's amazing.
- kristopolous 7y agoThere may be a clever way to subvert scponly and the nologin related commands with this. Still piecing it together but maybe
- asimjalis 7y agoBeautiful.
- pcr910303 7y agoThere's a lot of 'Why?'s here, what I feel from this is that the FS can now be a turing-complete system. This will allow to extend the 'Everything is a file' concept in UNIX (whether it's good or bad is a different question;) to computation. With BashFS, computation & interaction with other programs is now a file; we can 'open' a appropriate file instead of managing subprocesses anymore! This (at least to me) blur the difference between UNIX (where everything should be a file) and LispMachines (where everything is a Lisp object).
- TazeTSchnitzel 7y agoCheck out Plan 9.
- ORioN63 7y agoIs there something like FUSE for a single file? My use case is for pass. I like to keep my secret files in there, but I still have plain text redudancy, because, well, encrypted files are useless while encrypted. I would like to have a "virtual file" which any program could accept as its config file where I could control the results of `read()` In my case, I would associate the current file to its pass equivalent, decrypt the pass equivalent and return the decrypted data.
- xg15 7y agoSo what happens if I do ls mnt or find mnt? Also, this looks like the perfect thing to mount to a /htdocs directory or nfs-accessible folder :)