A
A
Alexander Nazarov2018-12-12 23:14:20
linux
Alexander Nazarov, 2018-12-12 23:14:20

Why doesn't && work in Screen?

Hello!

screen -dmS unpack unzip -o arhiv.zip && rm arhiv.zip

This command performs unzipping and deleting without a screen, and simply deletes the archive in the screen.
Why so, do not tell me?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2018-12-12
@wergio

Why so, do not tell me?

Because && breaks the command like this:
those. "run screen and delete file". To delete a file inside screen, write
screen -dmS unpack bash -c 'unzip -o arhiv.zip && rm arhiv.zip'

A
Alexander, 2018-12-12
@UPSA

screen -dm bash -c 'unpack unzip -o arhiv.zip && rm arhiv.zip'
try via bash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question