Last active
April 24, 2020 20:10
-
-
Save justinmklam/8f23bd9e81be3b530591434665ccc4f9 to your computer and use it in GitHub Desktop.
Cheat sheet for launching detached screens (ie. via crontab)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starts a detached screen and logs to a datestamped log file. '%' characters only need to be escaped if running this command via cron | |
screen -L -Logfile ~/my/log/path/$(date +\%Y-\%m-\%d_\%H-\%M-\%S).log -dm <command> | |
# Execute multiple commands in a detached screen session | |
screen -dm /bin/bash -c "command1 | command 2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment