tar czf /tmp/malix.tgz --exclude="/dev/" --exclude="/proc/" --exclude="/sys/" --exclude="/tmp/" /*
tar: removing leading '/' from member names
tar: short read
/ # ls -lhsA /tmp
total 1M
1.3M -rw-r--r-- 1 root root 1.3M Jun 23 13:51 malix.tgz
/ # du -sh /
1.0G /
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Great! So your tarball is being created (/tmp/malix.tgz is there and about 1.3MB), but you got this warning:
code
tar: removing leading '/' from member names
tar: short read
What these messages mean:
tar: removing leading '/' from member names
This is normal and expected when you archive absolute paths (/*). Tar strips the leading / to make the archive more portable (so files extract relative to the current directory instead of absolute paths).
tar: short read
This usually means tar tried to read a file but got less data than expected. This often happens when files change during the archive process or when special files (like device files, sockets, or procfs files) are included.
Why the "short read" happens here:
Even though you excluded /dev/*, /proc/*, /sys/*, and /tmp/*, you did not exclude the directories themselves (/dev, /proc, /sys, /tmp).
Tar will still try to read those directories, and some of them (especially /proc and /sys) contain virtual files that can cause "short read" errors.
Also, /proc and /sys are virtual filesystems that change constantly and are not suitable for archiving.
How to fix it:
Exclude the directories themselves, not just their contents:
bash
tar czf /tmp/malix.tgz --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/tmp /*
This will exclude the entire /dev, /proc, /sys, and /tmp directories, preventing tar from trying to read those problematic files.
Additional tips:
If you want to be extra safe, exclude other virtual or runtime directories like /run, /mnt, /media, etc.
You can also add --warning=no-file-changed to suppress warnings about files changing during the archive.
Final recommended command:
bash
tar czf /tmp/malix.tgz --exclude=/dev --exclude=/proc --exclude=/sys --exclude=/tmp /*
Summary:
Your tarball is created and valid.
The "short read" warning is harmless here but caused by virtual filesystems.
Exclude the directories themselves to avoid these warnings.
If you want, I can help you verify the contents of the tarball or suggest a more robust backup command!