mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
559 B
Plaintext
26 lines
559 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# exec
|
|
|
|
> Execute a command without creating a child process.
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-exec>.
|
|
|
|
- Execute a specific command:
|
|
|
|
`exec {{command -with -flags}}`
|
|
|
|
- Execute a command with a (mostly) empty environment:
|
|
|
|
`exec -c {{command -with -flags}}`
|
|
|
|
- Execute a command as a login shell:
|
|
|
|
`exec -l {{command -with -flags}}`
|
|
|
|
- Execute a command with a different name:
|
|
|
|
`exec -a {{name}} {{command -with -flags}}`
|