What Does the Command 'Sudo Sh -E ~/Downloads' Do?

What Does the Command 'Sudo Sh -E ~/Downloads' Do?

I am new to Ubuntu and learning how to use shell. Would someone please tell me what this command does:

sudo sh -e ~/Downloads

I know sudo sh will execute all commands in the shell as sudo. What is -e ?

1 Answer

This is a page describing the sh command.

The sh command runs or processes jobs through the Bourne shell.

The -e flag: If not interactive, exit immediately if any untested command fails. The exit status of a command is considered to be explicitly tested if the command is used to control an if, elif, while, or until; or if the command is the left hand operand of an "&&" or "||" operator.

Also see man sh.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.