& - The watch command is run in the background and control is returned to the terminal or parent process.This prevents the output from being written to the screen or, since nohup is being used, it prevents output from being sent to a file called nohup.out. That file discards any data written to it. >/dev/null - The greater-than redirects the output of the command being run by watch to a file, /dev/null.space or semicolon) it will need to be quoted. If the command line contains characters special to the shell (e.g. yourprog - The program or command line for watch to execute.If this option were not specified in the example, the times would get later and later by more than 30 seconds each time due to the time it takes to launch and execute the command ( yourprog). With it, each start of the command begins on the interval if possible. -precise - Without this option, watch runs the command after interval seconds.-n 30 - The interval at which to run the command.Normally the first screenful of output from the command is displayed each time watch runs the command. watch - This program runs a command repeatedly.nohup - This keeps the command that follows it, watch in this case, from exiting when the terminal exits.Here is an explanation of the parts of the command: Indicating a pretty good level of precision. If yourprog consists of: date +%M.%S.%N > yourprog.out Candidate for the most creative misuse of a Linux command: nohup watch -n 30 -precise yourprog >/dev/null &
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |