When I write Bash code, for example to copy files, if a file doesn't exist, in the terminal I see an error similar to file not found. If the user running the script doesn't have the necessary permissions, the error is similar to permission denied.
Basically, independently from the programming language used to write the code, the code to copy files will ask the OS (Linux in my case) to do that. If something goes wrong, the OS will return the appropriate error (number and message).
Is there a command I can run to list all the standard error codes?
Best Answer
The
errno
command can do this. Fromman errno
:So, to see all of them, run: