GNU Coreutils includes the timeout command, installed by default on many systems.
https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html
To watch free -m
for one minute, then kill it by sending a TERM signal:
timeout 1m watch free -m
More Related Contents:
- Setting PATH environment variable in OSX permanently
- Replace comma with newline in sed on MacOS?
- Unix command to prepend text to a file
- OS X / Linux: pipe into two processes?
- How to run mvim (MacVim) from Terminal?
- Is it possible to run Node.js scripts without invoking `node`?
- What is the Unix command to create a hardlink to a directory in OS X?
- How can I use xargs to copy files that have spaces and quotes in their names?
- Where are core dumps written on Mac?
- Cocoa/ Objective-C Shell Command Line Execution
- Print rpath of an executable on macOS
- Who is listening on a given TCP port on Mac OS X?
- dyld: Library not loaded … Reason: Image not found
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- In-place edits with sed on OS X
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- Yosemite and Valgrind
- Date command does not follow Linux specifications (Mac OS X Lion)
- How do I update the password for Git?
- find lacks the option -printf, now what?
- Vagrant box could not be found or could not be accessed in the remote catalog – incompatible curl version
- How can I clear previous output in Terminal in Mac OS X?
- Uninstall / remove a Homebrew package including all its dependencies
- cannot download, $GOPATH not set
- Mounts denied. The paths … are not shared from OS X and are not known to Docker
- dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
- Tell iPadOS from macOS on the web
- How do I set a task to run every so often?
- How to create a single shared framework between iOS and OS X
- How to create virtual hosts in MAMP?