Sort a huge file in UNIX

Hi all,

We are using Unix sort command to sort a 10 GB file. And the command is sometimes failing and some time it's running successfully.

We observed when it fails it's giving us below error:
/Tmp/somedirname - No space left on Device

So I saw in man pages that using sort -T would solve error. But I am unsure of the syntax. Can someone help we with the syntax

Please state

  • your Unix version
  • your sort command
  • a (small!) example of you input file!