Live data from Hacker News

Show HN: Bashfs – Run commands as your filesystem

github.com

11–20 of 35 posts

Re: Show HN: Bashfs – Run commands as your filesystem

#13

No, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.

They address this in the README. https://github.com/pcgrosen/bashfs#why

I 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?"

Re: Show HN: Bashfs – Run commands as your filesystem

#15

No, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.

The actual "why" is the author did it for fun, there's basically no purpose to it. I can try to explain it though:

Interacting with file systems can be generally summed up in a handful of basic operations. Two of the most important operations are open, which asks the filesystem if it has a file of a given name, and read, which reads the contents of that file. FUSE is a Linux wrapper for writing virtual file systems by implementing these basic operations. Here open, instead of taking a filename, is telling the program what command to run and read, instead of returning the contents of a file is returning the output of the command.

Re: Show HN: Bashfs – Run commands as your filesystem

#16

No, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.

Quote from the Readme: > Why not?

The "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.

Re: Show HN: Bashfs – Run commands as your filesystem

#17

No, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.

I'm glad I'm not the only one who didn't get it.

I can understand if you want to do something wacky with FUSE. Something like mounting a PostScript or JSON file, and using the filesystem interface to observe and modify the contents. Or something else that is vaguely hierarchical.

I just didn't see any "reasonable" mapping for running a series of commands to a filesystem.

Re: Show HN: Bashfs – Run commands as your filesystem

#18

Is there any way this can be useful for something? Or is it just a fun experiment with FUSE?

Possibly 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.

Re: Show HN: Bashfs – Run commands as your filesystem

#19
There'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).

Re: Show HN: Bashfs – Run commands as your filesystem

#20

No, but really, why? I am not putting it down. I just don’t understand what is happening exactly, and the why might help.

I get that it's for fun but the danger is security. Someone could use this as a "fun" feature at work and then get pwned.
Post reply on HN