I use the nvidia-smi command quite frequently, and I have a separate alias in my .bashrc that I use to monitor it (alias gpu=’watch -n 3 nvidia-smi’). I recently learned about customizing the output message of nvidia-smi and am using the following: nvidia-smi | tee /dev/stderr | awk ‘/ C / {print $3}’ | xargs -r ps -up that I
Tag: watch
Looking for a simple way to watch files, run a script, and refresh the browser
File is edited. File is saved. Bash script is run upon save. Browser refreshes itself to automatically show the changes. Windows, OS X, Linux Any suggestions? This seems like such an important thing that’s constantly overlooked, and I would greatly appreciate learning how to achieve this between all major OSes. Thanks, in advance. Answer There are a few options. One
why doesn’t watch work when piping the output of fortune into cowsay
cowsay is a silly linux tool for displaying a cow saying given text in the terminal. fortune is a silly linux too for displaying a “random” quote in the terminal. Both of these commands can be repeatedly ran in the terminal using watch e.g. Additionally these two commands can be combined so the cow says “random” quotes. By piping the