Hello. I want to run Inotifywait background. I use: nohup inotifywait -rm --timefmt "%Y %B %d %H:%M" --format "%T =-= %e %w%f" -e create,delete,move /somefile1 >> /somefile2 then type ctl+Z and bg and it runs background. But when I type such a way: nohup inotifywait -rm --timefmt "%Y %B %d %H:%M" --format "%T =-= %e %w%f" -e create,delete,move /somefile1 >> /somefile2 & and bg, it doesn't work.It moves background and stops,doesn't run. How can I run inotifywait background with & symbol?
Try this: Code: nohup inotifywait -rm --timefmt "%Y %B %d %H:%M" --format "%T =-= %e %w%f" -e create,delete,move /somefile1 >> /somefile2 &> /dev/null &
thanks falko. It sends log to /dev/null. So I use: Code: nohup inotifywait -rm --timefmt "%Y %B %d %H:%M" --format "%T =-= %e %w%f" -e create,delete,move /somefile1 > /dev/null &> /somefile2 & Can anybody explain why it needs two redirection, ">" ?