Then those containers or virtual machines should add this or create the home as needed.
systemd has its own containers, so this is the implementation of that requirement; “virtual machines” might use this exact binary to create home, among other directories like srv and what not. Someone at one point probably said “we always need to create these when spinning up systems, maybe systems can provide a mechanism to do that for us?” and then it was implemented.
Having/home listed as a tmp file on regular systems is problematic by the nature of what tmpfiles claims it does.
systemd-tmpfiles claims the following:
systemd-tmpfiles creates, deletes, and cleans up files and directories, using the configuration file format and location specified in tmpfiles.d(5). Historically, it was designed to manage volatile and temporary files, as the name suggests, but it provides generic file management functionality and can be used to manage any kind of files.
I rather think having a purge command was the issue here, at the very least it should print a big fat warning at what it does, better even list all affected files and directories. There’s no reason a normal user needs this and with the name of the binary, it’s totally misleading, which is an issue in these situations.
I don’t think that’s what’s happening. There’s no hard requirement for
cat
to read everything straight into memory. It can send data once it’s available, and the receiving process can read it as fast as it wants. There are cases where this might be more clear: Let’s say you have a big video file that you want to convert to something that only supports like y4m input and is not in ffmpeg. A common way is something likeffmpeg -i infile -f yuv4mpegpipe - | encoder --y4m outfile
- I’m pretty sure ffmpeg won’t read the whole infile into memory, nor will it store the whole y4m representation in memory. Instead, it will decode infile as necessary and push into the pipe at the speed the encoder can handle.But yeah, I remember something about tar using libraries for compression being more efficient that piping its output to a compressor. So it’s still the better route, but probably not as much better as you think.