Store temporary work files that need not be permanent but should normally survive a system reboot.
Which FHS directory is appropriate?
/var/tmp is for temporary files retained across reboots. /tmp is shorter-lived and may be cleared at boot; /run is runtime state.
Detailed explanation
/runIncorrect. /run is generally a volatile runtime filesystem.
/tmpIncorrect. /tmp may be cleared during boot.
/var/logIncorrect. /var/log is for logs.
/var/tmpCorrect. /var/tmp is intended for temporary files that can persist across reboot.
Try it yourself
An example you can run in a temporary verification environment.
test -d /var/tmp && printf '/var/tmp exists\n'Expected result
/var/tmp existsKey points
- /var/tmp survives reboot
- /tmp is short-lived
- /run is runtime data
Notes
- Environment: FHS準拠Linux / ディレクトリ存在確認のみ
- Use read-only lookups or disposable paths when verifying search behavior.
- Distribution-specific defaults should be checked before changing system configuration.
Foundation review
Place the operation
Neither location is permanent storage; /var/tmp simply has a longer expected lifetime than /tmp.
Check the side effect
Confirm the distribution's cleanup policy before depending on retention for an important workflow.