Mac Terminal

So I was typing some things in Terminal and after a while, I decided to use (sudo powermetrics --samplers smc |grep -i “CPU die temperature") to check CPU temperature but I was greeted with (pipe dquote>). Now would anyone know how to exit this? I already tried looking it up but it isn't helping. Any help is appreciated!

MacBook Pro 13″, macOS 10.15

Posted on Aug 30, 2022 6:13 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 30, 2022 8:24 AM

In the Terminal, just type control+c to break out of the command expecting you to complete its syntax. Don't type control+z as that just throws the session in the background.


For Intel platforms only (notice the spacing around the pipe symbol).


sudo powermetrics -n 1 --samplers smc | grep "(CPU|GPU) die"

This was from a just booted Core i7 iMac:




21 replies

Sep 21, 2022 1:06 PM in response to LegionScyther7

There is no safety net on the command line except for what the user creates themselves by making sure any affected files are backed up. Nothing you discussed in this thread should have made any changes to your environment or macOS. Also, we have no way of knowing all the commands you ran or any files which you may have modified.


Be extremely careful using any commands found on the Internet without fully understanding what those commands and each option with those commands will do. You can get more information on each individual command by reviewing the manual "man" pages for each command which will also tell you what each option does. For example, for the commands mentioned in this thread you could check what each one by running these commands:

man  sudo
man  powermetrics
man  grep


Be extremely careful when using "sudo" because it gives the command following it full root (aka admin) access which can very easily cause you to break macOS or even accidentally delete all your data without any way of recovering it except from a backup since data deleted using the command line does not go to the Trash. Without "sudo " pre-pending the command your local user data is still at risk from a mistake, but it does minimize accidents occurring outside of your home user folder. Keep in mind that even users with years of command line experience have been known to make a simple mistake that has had terrible repercussions....sometimes just because of a simple typographical error.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mac Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.