sort /tmp space issue

method1

-T, --temporary-directory=DIR
use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories

$ sort -T /home/jadu/ -t "|" -k5 ka.log.32323112.out > ka.log.32323112.out

method2

Another way would be : export env variable TMPDIR to some directory which have sufficient space.

e.g.

$ export TMPDIR=/path/to/other/directory
$ sort -t "|" -k5 ka.log.32323112.out > ka.log.32323112.out

原文地址:https://www.cnblogs.com/kakaisgood/p/13036352.html