Posts

Showing posts with the label terminal commands

Clear terminal with a shortcut

Hey welcome to my blog. There is a simple command to clear out the terminal.  Just hit this shortcut: CMD + k

Monitor mac from terminal | htop command in MAC

Usage: To analyse CPT usage, memory usage, taks running. htop command in Linux system is a command line utility that allows the user to interactively monitor the system’s vital resources or server’s processes in real time. htop is a newer program compared to top command, and it offers many improvements over top command. htop supports mouse operation, uses color in its output and gives visual indications about processor, memory and swap usage. htop also prints full command lines for processes and allows one to scroll both vertically and horizontally for processes and command lines respectively. Syntax: htop [-dChusv] Understand the columns: PID: ProcessId UserId: User through which process is running Priority: 0 to 40 NI: The nice value of the process, which affects its priority. (-19highest to 19lowest) VIRT: virtual memory being used by the process RES: How much physical RAM the process is using, measured in kilobytes. SHR: How much shared memory the process is using. S: The curre...

Don't let your MAC sleep | Cool terminal commands Part2

 Hey, have you ever faced an issue where you don't want your MAC to enter into sleep mode. Here is the solution. Open the terminal by typing 'terminal' in the spotlight and press return . Type " caffeinate -t 18000"  in the terminal. This will keep your MAC awake for 18000 miliseconds or 5 hours. If you want to wake it up before that, hit CMD+C. If you want to make it awake for undetermined time, type only  caffeinate  and hit CMD+C when you want to awake. ➜   ~ caffeinate -t 18000

Let your MAC speak | Cool terminal commands Part1

This might sound strange, but you can actually make your MAC speak. There is a command say Open the terminal , type "terminal" in the spotlight, and hit enter. This will open up the terminal. Type 'say' in the terminal and press enter. It enters into the prompt state, now it will speak whatever you type. Try typing "Hello world", your intelligent MAC will speak the exact words. Press CMD+C when you wish to exit. ➜   ~ say Hello Shubham, it's your mac talking ~Kindly let me know in the comments section if you find this interesting. Happy coding :)