Skip to content
Advertisement

Tag: unix

How to get the process status only with “R” in linux?

–Need to get the status of the background running script. Initially, I ran the script and terminated it turned to stat “T” further, running the same script but while grep getting the script with stat “T”and “R” Here, how to get the process with only “R”. here is the command used ps aux | grep test.sh | grep -v grep

How to read file in linux command line?

I’m doing this challenge thing and this is one of the levels: An agent on Level 05 has told us about another big hack he’s working on. Apparently someone broke into a popular shopping site, stole all the usernames and passwords and was going to post them online. Luckily, we got to them first and recovered the details. Why is

Permission to access another remote server Linux, Ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

grep string after first occurrence of numbers

How do I get a string after the first occurrence of a number? For example, I have a file with multiple lines: I want to get the following output: Thank you. Answer Imagine the following two input files : A quick solution with awk would be : This line substitutes the first string of anything that does not contain a

How to kill a process after a given real running time in Bash?

For killing a process after a given timeout in Bash, there is a nice command called timeout. However, I’m running my program on a multi-user server, and I don’t want the performance of my program to be influenced by others. Is there a way to kill a process in Bash, after a given time that the program is really running?

Interruption of signal handler with other signal?

Can a signal handler be interrupted by another signal (except of SIGKILL, SIGSTOP)? Therefore, do I need to check for EINTR in my signal handler when calling interruptable syscalls? (Linux and other Unixes) Answer Yes, the execution of a signal handler may itself be interrupted by the delivery of another signal. There are a few nuances, however. By default, user-defined

Bash Script Unstable Result

I have bash script and I put in the crontab. It runs every 10 minutes. When I run it manually, it gives perfect results. It creates “.tmp” files and these “.tmp” files are not empty, but Crontab results are not as I expected. it only creates “.tmp” files. Contents of “.tmp” files are empty. In this computer there more than

Advertisement