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.
Incorrect. /run is generally a volatile runtime filesystem.
/tmpIncorrect. /tmp may be cleared during boot.
Incorrect. /tmp may be cleared during boot.
/var/logIncorrect. /var/log is for logs.
Incorrect. /var/log is for logs.
/var/tmpCorrect. /var/tmp is intended for temporary files that can persist across reboot.
Correct. /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 / ディレクトリ存在確認のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.