I am in ubuntu, when I write dmesg the error messages appear in red, how could I print in the console only those?


use --level option described in man dmesg:

  -l, --level list
         Restrict output to the given (comma-separated) list of levels.
         For example:

                dmesg --level=err,warn

         will print error and warning messages only.  For all supported
         levels see the --help output.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.