I would like to play a short sound file from the command line in Mac OS X, independent of any audio player application, in order to provide notification that a long job has finished. The man page does not document all of its options, which can be found via afplay -h :. One time, when the power went off at work, knowing that my firewall would return to that last state powered on when the electricty came back on, I wrote a script in bash that used the say command to wake me up when the power came back on. Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered.
Ask Question. Asked 8 years, 2 months ago. Active 5 years, 10 months ago.
Command line arguments
Viewed 17k times. Kevin Reid Kevin Reid 2, 1 1 gold badge 14 14 silver badges 26 26 bronze badges. The man page does not document all of its options, which can be found via afplay -h : Usage: afplay [option Are there any alternatives? Kirk Kirk 2, 13 13 silver badges 19 19 bronze badges.
Command line audio player for Mac High Sierra
I love abusing the say command. You can even set up scripts to run periodically or at timed intervals in the background, similar to cron jobs on Linux. For example, if you'd like to have the Apache web server start automatically when you turn on your Mac, simply type:. Running launchctl list will show you what launch scripts are currently loaded. To see what goes into a launch agent or daemon, there's a great blog post by Paul Annesley that walks you through the file format. And if you'd like to learn how to write your own launchd scripts, Apple provides some helpful documentation on their Developer site.
There's also the fantastic Lingon app if you'd prefer to avoid the command line entirely. Without any options, say will simply speak whatever text you give it out loud :. You can also use say to speak the contents of a text file with the -f flag, and you can store the resulting audio clip with the -o flag:. The say command can be useful in place of console logging or alert sounds in scripts. For instance, you can set up an Automator or Hazel script to do batch file processing and then announce the task's completion with say.
- Eight Terminal Utilities Every OS X Command Line User Should Know!
- opstarten veilige modus mac os x.
- best budget templates for mac;
- software per catalogare libri con mac!
But the most enjoyable use for say is rather more sinister: if you have ssh access to a friend or coworker's Mac, you can silently log into their machine and haunt them through the command line. Give 'em a Siri-ous surprise. You can set the voice and language! It can do everything its graphical cousin can, but it also has some extra capabilities—such as filling a disk with zeroes or random data. Simply type diskutil list to see the path names of disks and removable media attached to your machine, and then point the command at the volume you want to operate on.
Be careful: diskutil can permanently destroy data if it's used incorrectly. Alright—this isn't technically a native command. But no OS X power user should be without Homebrew. The website calls it "The missing package manager for OS X," and that couldn't be truer.
If you've ever used apt-get in Linux, you will feel right at home in Homebrew. For instance, brew install imagemagick will set you up with ImageMagick , a powerful utility that makes it possible to do anything from whipping up animated gifs to converting images between dozens of different types.
You can have fun with Homebrew too: brew install archey will get you Archey , a cool little script for displaying your Mac's specs next to a colorful Apple logo. The selection in Homebrew is huge—and because it's so easy to create formulas , new packages are being added all the time. But the best part about Homebrew? That means you can install newer versions of system software, such as python and mysql , without interfering with the built-in equivalents. And if you ever want to get rid of your Homebrew installation, it's easy to remove using the uninstall script.
- connect to openvpn server mac?
- What is Tizonia?.
- free download sims 3 university life mac!
- Cloud music from the Linux terminal.
- Subscribe to RSS;
- Featured Posts!
For more fun with Terminal. Thanks to reader feedback, I've written about a few more commands in a follow-up post: And eight hundred more. Mitchell Cohen is a writer and technophile from Toronto.
He writes about coffee, code, journalism, language, insomnia and giant spiders over at his blog, Mitchchn. You can follow him on Twitter at mitchchn. Want to see your work on Lifehacker? Email Andy.
Entering MPlayer homepage
The A. Filed to: command line Filed to: command line command line terminal terminal window shell os x mac os x keyboard shortcuts repub. Share This Story. The Root. The Root The Grapevine.