I want to check my users commands on my server for a period of time so I use sysdig command with nohup. I want to write output to a file like so:
# nohup sysdig -c spy_users 1>>/path/to/true 2>>/path/to/false &
But result is not written to file realtime. Any idea?
Probably it is being buffered. Try to set the buffering to line-buffer or deactivete it completely:
nohup stdbuf -oL -eL sysdig -c spy_users 1>>/path/to/true 2>>/path/to/false &