[pacman-dev] [PATCH] Replace @SIZECMD@ with POSIX-compatible command
mikeonthecomputer at gmail.com
Sat Mar 25 00:26:26 UTC 2017
On Mon, 2017-03-20 at 15:19 +1000, Allan McRae wrote:
> On 20/03/17 12:55, Drew DeVault wrote:
> > Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX
> > commands and removes the need for any platform-specific usages.
> I'm sure we had this in the past and changed to what we have
> Can't remember why... compressing filesystems maybe?
`wc -c` always shows the true size of a file -- that is, the number of
bytes of information it contains, not a multiple of the block size. The
compressed size can only be calculated by looking at the number of
blocks allocated. This command is safe for all compressing/sparse-
supporting file systems.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 874 bytes
Desc: This is a digitally signed message part
More information about the pacman-dev