How do I "peek" at a running but detached screen? [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 9 years ago.
Improve this question
I have a script that runs in the background on a detached screen but doesn't write to a log file. (screen -dmS somename somescript)
When I check on the script, I attach to it (screen -r somename) then detach when I'm done (C-a d).
Instead of attaching then detaching, is it possible to simply "peek" at what's on the screen?
Something similar to echo "$(screen -r somename)" that actually works?

The -X option sends a command to a running screen instance:
screen -r somename -X hardcopy
the hardcopy command writes a screen dump into hardcopy.N, where N is the index of the active screen.

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"

how to trace a shell script running the 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 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.

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"'

unlimited scrolling up from default linux command line [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
I am looking to increase the default size of the scrolling up buffer from linux command line. It is a Debian server without gui.
I don't find related option in bashrc and I don't even know if there is other configuration file for the default prompt alt+f1 alt+f2 ...
You can change the scrollback-buffer size using kernel options as described here: https://wiki.archlinux.org/index.php/Scrollback_buffer .
However, if you are interested in the output of a command but at the same time you want to watch the command's progress interactively I suggest to use tee:
command | tee out.file
or if you want to append to a file use
command | tee -a out.file
tee is nice! use it! :)

How to log terminal keystrokes in 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 may be able to be answered.
Closed 8 years ago.
Improve this question
I want to log whatever is happening in my terminal in a text file . I want to save all session information in the log file. We can do this in putty. But I dont know how to achieve the same in simple terminal in ubuntu. Also, is it possible to use putty to open a terminal for localhost? I tried doing that . But does not work.
You can record your terminal session (assuming you're using Bash) by doing script.
You probably want script -k which records input and output.
So in all, doing something like script -k logfilename you will get what you want!

Resources