How to redirected output from disowned process to a file
0
votes
1
answer
42
views
A borgmatic backup command that runs for many hours:
long_running_cmd &> file.txt
I did
Strg+Z
then bg
then disown
to keep the command running I case my laptop goes to sleep or disconnects.
I thought the whole command chain just gets executed in the background, but I notice it did not write into it any more.
How do I ensure that the output of a command is written to the file even after I disconnect my ssh connection? (*if possible with default commands that can be found in a Debian headless server installation*)
Asked by Destro
(15 rep)
Jun 3, 2025, 05:50 AM
Last activity: Jun 3, 2025, 10:18 AM
Last activity: Jun 3, 2025, 10:18 AM