walak
walak

Reputation: 93

How to run command in Screen with parameters

I'm trying to run a command on detached Screen. The problem is that it does not work when the command has additional parameters, e. g.:

screen -L "ls"

It produces a file (screenlog.0) with directory listing. But when I'm running

screen -L "ls -la"

Screen fails with error: Cannot exec 'ls -la': No such file or directory

Is there any way to run it properly in a Screen session?

Upvotes: 3

Views: 3313

Answers (1)

Son
Son

Reputation: 1050

You should use screen without quotes, then should be ok.

Upvotes: 4

Related Questions