Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "&!" (ampersand and exclamation) mean in linux shell

Tags:

shell

I found that some people run a program in shell like this

exe > the.log 2>&1 &!

I understand the first part, it redirects stderr to stdout also "&" means runs the program in background, but I don't know what does "&!" mean, what does the exclamation mark mean?

like image 215
Peiti Li Avatar asked Jul 03 '17 21:07

Peiti Li


People also ask

What the Fox say Meaning?

Speaking of the meaning of the song, Vegard characterizes it as coming from "a genuine wonder of what the fox says, because we didn't know". Although interpreted by some commentators as a reference to the furry fandom, the brothers have stated they did not know about its existence when producing "The Fox".

What does the fox say for real?

One of the most common fox vocalizations is a raspy bark. Scientists believe foxes use this barking sound to identify themselves and communicate with other foxes. Another eerie fox vocalization is a type of high-pitched howl that's almost like a scream.

What is this song Google?

Ask Google Assistant to name a song On your phone, touch and hold the Home button or say "Hey Google." Ask "What's this song?" Play a song or hum, whistle, or sing the melody of a song. Hum, whistle, or sing: Google Assistant will identify potential matches for the song.


1 Answers

Within zsh the command &! is a shortcut for disown, i.e. the program won't get killed upon exiting the invoking shell.

See man zshbuiltins

disown [ job ... ]
job ... &|
job ... &!

Remove the specified jobs from the job table; the shell will no longer report their status, and will not complain if you try to exit an interactive shell with them running or stopped. If no job is specified, disown the current job. If the jobs are currently stopped and the AUTO_CONTINUE option is not set, a warning is printed containing information about how to make them running after they have been disowned. If one of the latter two forms is used, the jobs will automatically be made running, independent of the setting of the AUTO_CONTINUE option.

like image 184
Eduard Itrich Avatar answered Nov 15 '22 05:11

Eduard Itrich