Difference and correct usage for /tmp and /var/tmp
Solution 1:
The main difference between both, is that /tmp is wiped whenever the system reboots where as /var/tmp gets preserved across reboots.
You'll be able to find further information regarding linux standard directory structures at the following link : http://www.pathname.com/fhs/pub/fhs-2.3.html#VARTMPTEMPORARYFILESPRESERVEDBETWEE.
Solution 2:
Historically, /tmp was an in-memory-only filesystem, meaning its contents were destroyed by a reboot. /var/tmp was in a real file system, meaning its contents could survive a reboot.