how to trace a shell script running the background? [closed] - linux

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 may be able to be answered.
Closed 6 years ago.
Improve this question
I have run a script like this:
script.sh > terminal.txt 2>&1 &
It contains long loops.
how can I trace (which process with what name and what id was created) that script and kill the process to terminate that?

Type fg in the terminal. Then type Ctrl+c.
See: Job Control Commands

Though, #hek2mgl 's answer was great help and paved the way to solution, but the actual solution is a bit different:
Type fg in the terminal.
Then type Ctrl+z.

Related

Hide output from cronjobs running in background [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 may be able to be answered.
Closed 3 years ago.
Improve this question
I have few python cronjobs running at a regular interval, set up in crontab. Now I have crond -b running in the background. However, I get following message printed on the console for every run of the cronjob
crond[27827]: USER root pid 27829 cmd python mypythonscript.py
How can I hide these outputs from appearing in the console?
I believe this is crond writing the syslogs and nothing to do with redirecting logs to /dev/null. You could try editing /etc/sysconfig/crond file to set CRONDARGS to
CRONDARGS="-s off"

Linux command needing translating [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 may be able to be answered.
Closed 5 years ago.
Improve this question
I have just started learning the Linux system and I need some help to translate the following to English:
grep WARNING readme.txt
and
grep WARNING readme.txt > warnings.txt
This is a homework question that i have researched myself but having trouble learning exactly what it means.
thanks in advance.
Try making a file on your computer named readme.txt. Put some lines of text in there, and make sure that some lines say "WARNING" while other lines do not.
Then run your first command and observe its output.
Then run your second command and observe its output and observe what was written to warnings.txt.

linux - adding a user [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 may be able to be answered.
Closed 6 years ago.
Improve this question
I have this code but it is not compiling correctly. I want to create a user with a default shell of bin/sh with the group adults. Any suggestions?
Command: useradd -s /bin/sh –g adults michael
Thank you.
First of all the code given is not being compiled, but rather executed by a shell. Then your command is perfectly fine, given that the adults group already exists before you type the command into your shell.
So without error, or more context, nobody will be able to tell you more than what I'm telling you:
there's no issue with your command.

Bash Terminal: How do I bind Ctrl+K to kill-whole-line THEN clear screen? [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 may be able to be answered.
Closed 7 years ago.
Improve this question
basically I want to set a shortcut (ctrl+k) in my cygwin linux terminal to run
bind '"\C-k": kill-whole-line'
THEN immediately run
alias cls="echo -e '\033c\c'"
Both work by themselves but I would like to do it in one keyboard shortcut. Thanks in advance!
This sequence clear current input and executes terminal reset.
bind '"\C-k": "\C-e\C-uecho -e \"\\033c\\c\"\n"'

How can i stop someone from spamming my console using the write command in linux [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 may be able to be answered.
Closed 8 years ago.
Improve this question
How can I block someone from spamming by console using the "write" command in unix.
Run the command mesg n. Preferably, add it to your .bashrc or equivalent so it runs when you start up.
In your console, type:
mesg n
For more information, read the manual pages (man mesg).

Resources