In the command line to slice or merge chunks of files without occupying additional space?
split and cat make a new file. And it is necessary to redistribute existing data across multiple files and Vice versa.
Something similar does fallocate (linux) - stupidly reserves under file existing free blocks.
I need something the same, but with pearl buttons.
Under the 3 OS and CLI.
On the basis of the standard file API is likely impossible. Let me explain why. Linux operates on a file level API commands open/close/seek/read/write. This is the basis which works for all file systems. If you go down to the level of a specific file system (e.g. vfat) then you can probably cut the file into pieces is a multiple of the block size of the file system without re-allocations. But it's a dirty hack which will only work under root only for a specific file system. And only for special conditions (boundary block). In General, technically it can be done but the use of this utility will be "devastating" nature of the utilities like parted, fdisk, mkfs.* and others. I seriously doubt that such tools will be useful and relevant. It is better to use the normal API.
Glenna answered on April 4th 20 at 00:38
It is impossible to do so.
You can cut the particular file using truncate, but that of one to make a few - will not work.
fallocate does not, he creates a file of the right size, but fills it with data, just telling the filesystem how much space it needs. But fallocate does not control a specific area of the disc, and slice the already existing data can not in principle.
The only option is to read the file into memory, delete it on the disk and to burn a few already from memory. But it is clear that the size of the file with limited capabilities. You can write. And in any case will be read/write.