detach
Synopsis
Section titled “Synopsis”detach [-h] [--version] [--] <command> [args...]Description
Section titled “Description”Runs a command in the background using nohup, fully detached from the terminal with stdout/stderr discarded. The command survives the current session.
detach reads its own options only before the command. The first other word is the command’s name, and it and everything after it are passed on unchanged, so options meant for the command (even -h or --version) reach it. Use – to run a command whose name starts with -.
Arguments
Section titled “Arguments”-h, --help |
Show help message |
--version |
Show version information |
-- |
End detach’s options |
command |
The command to run detached |
args... |
Additional arguments for the command |
Exit Status
Section titled “Exit Status”0 |
Command launched or help/version shown |
1 |
nohup is not installed |
2 |
No command provided, or an unknown option before the command |
Example
Section titled “Example”detach rsync -a ./data remote:/backup/detach ls -laDependencies: nohup