tmutil compare gives differences between two backups. But I wonder how do I sort the output by file size? With GNU sort, there is the --human-numeric-sort option for this, but the sort which is part of macOS doesn't support this. So how can I sort the result by file size?

  • Welcome to AskDifferent. You had two questions in here. This site works better when there is only one question per question. That way, it's easier for other people to find solutions if they have the same problem. I've edited out your second question, but feel free to ask it separately. – nohillside Dec 27 '18 at 11:10
  • @nohillside I am sorry but this kind of post editing is incredibly unusual on StackExchange and quite unacceptable. – leosenko Dec 28 '18 at 12:23
  • Look, we know from a lot of experience that questions containing more than one actual question don't work very well. People might answer one, or the other, or both. One of the questions might have already come up before, so we could close it as a duplicate. The best answers for the two questions might be in two different posts, so which one are you going to accept? Reading apple.meta.stackexchange.com/questions/882/… and apple.stackexchange.com/help/editing will provide more details on this. – nohillside Dec 28 '18 at 12:30

I don't know exactly how sort -h is supposed to work since it mixes the B, K, M and G prefixes, but it was at least workable for me in Mojave:

cat tmutil-compare | grep "M  " | cut -c 3- | sort -h

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .