Is there possible to create file that is just a sub-sequence of bytes from another file, like a symlink, but referencing only part of the file?
|
|
No. You must either reference the whole file, or you must copy the part of the file you're interested in. |
|||
|
|
|
Yes, it is (somewhat) possible at least on Linux with some limitations. The method is to create a read-write loop device that maps to a subset of the file. eg:
output:
I believe both the offset and the size must be multiple of a block size (512 bytes). You probably need to be root to create and access the loop device. If you need a symlink, you can create one that points to the loop device. |
||||
|
|
|
It could be possible (to create a normal symlink pointing to a part of a file) on a filesystem which implements the "file as directory" idea, which appeared--besides other authors--in the plans for reiserfs, but the reiserfs's implementation wasn't liked for the problems the implementation caused. |
|||
|
|