F5F Stay Refreshed Software Operating Systems Ensure the service stays active by configuring it for persistent execution or using monitoring tools.

Ensure the service stays active by configuring it for persistent execution or using monitoring tools.

Ensure the service stays active by configuring it for persistent execution or using monitoring tools.

O
ofeliant
Member
174
05-10-2023, 10:05 AM
#1
I’m working on recovering hard disk data with photorec. I began through an SSH connection from my Mac. From DDrescue instructions, closing the terminal in Mac OS halts the process. The Linux machine runs Ubuntu.
O
ofeliant
05-10-2023, 10:05 AM #1

I’m working on recovering hard disk data with photorec. I began through an SSH connection from my Mac. From DDrescue instructions, closing the terminal in Mac OS halts the process. The Linux machine runs Ubuntu.

S
SEBS12345
Junior Member
48
05-10-2023, 10:32 AM
#2
Execute <options> & This disconnects the command from the terminal and moves it to the background. Standard bash actions. Another method to test is screen. ( manual <-link) HTH!
S
SEBS12345
05-10-2023, 10:32 AM #2

Execute <options> & This disconnects the command from the terminal and moves it to the background. Standard bash actions. Another method to test is screen. ( manual <-link) HTH!

W
Wixxix
Junior Member
10
05-10-2023, 02:52 PM
#3
You can display the contents of the screen by running the specified command, then navigate to the desired file using the ls command.
W
Wixxix
05-10-2023, 02:52 PM #3

You can display the contents of the screen by running the specified command, then navigate to the desired file using the ls command.

C
ChafSwafty
Member
123
05-10-2023, 04:04 PM
#4
I agree on choosing a terminal multiplexer. The screen looks great and Tmux provides another option with more customization, though they serve similar purposes. The advantage of these tools is you can quickly switch between sessions and view all standard outputs from running processes. With several instances, you can set up multiple virtual windows and panels, making it very flexible. They keep the background tasks alive when you disconnect. I even run Tmux both through SSH and within my main terminal window, which helps avoid process termination if the terminal is accidentally closed or crashes.
C
ChafSwafty
05-10-2023, 04:04 PM #4

I agree on choosing a terminal multiplexer. The screen looks great and Tmux provides another option with more customization, though they serve similar purposes. The advantage of these tools is you can quickly switch between sessions and view all standard outputs from running processes. With several instances, you can set up multiple virtual windows and panels, making it very flexible. They keep the background tasks alive when you disconnect. I even run Tmux both through SSH and within my main terminal window, which helps avoid process termination if the terminal is accidentally closed or crashes.

M
Maylo101
Member
143
05-11-2023, 12:30 AM
#5
I realized Photorec would resume from its last point. I'll remember the screen.
M
Maylo101
05-11-2023, 12:30 AM #5

I realized Photorec would resume from its last point. I'll remember the screen.

M
Mallignence
Member
62
05-11-2023, 03:48 AM
#6
Begin a tmux session on the Linux machine to keep it running even after disconnecting. You can later rejoin using commands like "tmux new -s journal-session". To execute any command, press "ctl+b". Detach with "d", list sessions with "tmux ls", attach back with "tmux attach -t journal-session".
M
Mallignence
05-11-2023, 03:48 AM #6

Begin a tmux session on the Linux machine to keep it running even after disconnecting. You can later rejoin using commands like "tmux new -s journal-session". To execute any command, press "ctl+b". Detach with "d", list sessions with "tmux ls", attach back with "tmux attach -t journal-session".

C
crost95
Member
189
05-11-2023, 07:39 AM
#7
your primary method has consistently been the screen. for frequent use, consider setting up a cron job and possibly converting it into a daemon service with systemd.
C
crost95
05-11-2023, 07:39 AM #7

your primary method has consistently been the screen. for frequent use, consider setting up a cron job and possibly converting it into a daemon service with systemd.

O
oliv8041
Member
160
05-31-2023, 03:20 PM
#8
It was a brief occurrence. I'm attempting to retrieve information from a hard disk where a partition vanished. The drive hasn't been used in about two years. It became simpler for me to connect via SSH to my Plex server (since the tools I'm using are Linux-based and command-line oriented). Now I realize the importance of screen. I also installed it. I'll remember this for future situations.
O
oliv8041
05-31-2023, 03:20 PM #8

It was a brief occurrence. I'm attempting to retrieve information from a hard disk where a partition vanished. The drive hasn't been used in about two years. It became simpler for me to connect via SSH to my Plex server (since the tools I'm using are Linux-based and command-line oriented). Now I realize the importance of screen. I also installed it. I'll remember this for future situations.

W
watgif
Junior Member
23
06-14-2023, 01:51 AM
#9
you're seeking a simple way to run commands without installing anything. `nohup` lets you do this by using `nohup command &`, and you can also send both stdout and stderr to a file with `2&> filename`. Be aware that systemd may terminate user background processes unless configured as a daemon, so if you're using systemd and want persistent service behavior, consider setting up a user service in your system configuration.
W
watgif
06-14-2023, 01:51 AM #9

you're seeking a simple way to run commands without installing anything. `nohup` lets you do this by using `nohup command &`, and you can also send both stdout and stderr to a file with `2&> filename`. Be aware that systemd may terminate user background processes unless configured as a daemon, so if you're using systemd and want persistent service behavior, consider setting up a user service in your system configuration.