2

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?

yasin
  • 107
  • 10

1 Answers1

4

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 &
Poshi
  • 5,332
  • 3
  • 15
  • 32