In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How are nohup and tail-f used in linux? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Nohup command
Purpose: run the command without hanging up.
Syntax: nohup Command [Arg... ] [&]
Description: the nohup command runs the command specified by the Command parameter and any related Arg parameters, ignoring all SIGHUP signals. Use the nohup command to run the program in the background after logging out. To run the nohup command in the background, add & (the symbol for "and") to the end of the command.
Whether or not the output of the nohup command is redirected to the terminal, the output is appended to the nohup.out file in the current directory. If the nohup.out file in the current directory is not writable, the output is redirected to the $HOME/nohup.out file. If there is no file that can be created or opened for append, the command specified by the Command parameter cannot be called. If standard error is a terminal, the specified command is written to all outputs of standard error as standard output is redirected to the same file descriptor.
Exit status: this command returns the following exit values:
The command specified by the Command parameter can be found but cannot be called.
An error occurred in the 127th nohup command or could not find the command specified by the Command parameter.
Otherwise, the exit status of the nohup command is the exit status of the command specified by the Command parameter.
Nohup command and its output file
Nohup command: if you are running a process and you don't think it will end when you exit your account, you can use the nohup command. This command can continue to run the corresponding process after you exit your account / close the terminal. Nohup means not to hang (n ohang up).
The general form of the command is: nohup command &
Use the nohup command to submit a job
If you submit a job using the nohup command, by default all output from the job is redirected to a file named nohup.out, unless you specify another output file:
Nohup command > myout.file 2 > & 1 &
In the above example, the output is redirected to the myout.file file.
So the command to use nohup. / startWeblogic& is to allow the process to suspend execution in the background, and to be able to see the weblogic health in the nohup.out in the directory
To view the log, type tail-f nohup.out in the directory, where tail is to see the end of the file. Because the nohup.out is constantly updated, use tail-f to view the updated content.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.