V
V
vaniqq2016-10-01 12:33:40
linux
vaniqq, 2016-10-01 12:33:40

How to save space if there are identical files in directories?

Hello everyone, I have a task to save disk space as much as possible. In general, there are 10 folders in which 80% of the contents are identical to those in folders 1,2,3, etc. Please tell me how to make it so that there is 1 file for all these 10 folders? In general, I want all 10 folders to weigh as one
If it's not difficult, please write a small instruction. For example, I need to do this:
There are folders 1,2,3 and they have an asd.bin file in the root, how can I make this asd.bin be taken from folder 1 and be common to all other folders. I hope I made my question clear :)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
protven, 2016-10-01
@protven

If there is a lot of data directly - dig towards the FS with data deduplication. Offhand - ZFS.

A
Alexander, 2016-10-01
@NeiroNx

to be taken from folder 1, it must be there. And in folders 2, 3 we create symlinks to this file in folder 1.

ln -s 1/asd.bin 2/asd.bin
ln -s 1/asd.bin 3/asd.bin

A
abcd0x00, 2016-10-02
@abcd0x00

You need to make storage for all files. And store symlinks in folders. There are also hard links - this is when two or more names refer to one file. With hard links, the system will think that this is a file, not a link (sometimes you need this).

D
Dmitry Bannik, 2016-10-03
@prodimon

Read about OverlayFS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question