August 2017
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

August 2017
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Changing temporary directory for sort – bash

I was sorting a very big file using Linux sort command and unfortunately the sort failed as there was not enough space on my /tmp directory.

$ sort -t “|” -k5 ka.log.32323112.out > ka.log.32323112.out sort: /tmp/sort1928700448: write error: No space left on device

just to mention, sort by default uses /tmp for temporaries.

So, how […]