What Is Question Mark in Linux?

What Is Question Mark in Linux?
Contents

The question mark is identified by the shell as a single character. In this case the name is specified as any directory with the second character of the directory name ‘d’, followed by any other characters. find did not output anything because there were no directory names that matched the -name specification.

What is the meaning of $?

$? Expands to the exit status of the most recently executed foreground pipeline. By convention an exit status of 0 means success, and non-zero return status means failure. Learn more about exit statuses on wikipedia.

What is $? bash?

$? is a special variable in bash that always holds the return/exit code of the last executed command. You can view it in a terminal by running echo $? . Return codes are in the range [0; 255]. A return code of 0 usually means everything is ok.

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.