9 responses

  1. Parakeet
    December 7, 2010

    this + ssh is fun

  2. Alberto
    December 8, 2010

    Maybe it is faster to use quicklook?

  3. scstsut
    February 5, 2012

    # afplay file.mp3 &
    # killall -STOP afplay
    # killall -CONT afplay
    (then use the up-arrow to choose a previous command to avoid having to type the pause/unpause commands (-STOP/-CONT))

  4. Donald
    July 18, 2016

    it actually works, i had a bit of difficulty at the beginning but yea finally managed to get it working !

  5. Jacob
    November 21, 2016

    It’s a royal pain to get it to play a bunch of mp3’s though. To get it to play all files in the current directory (sequentially), I had to do this:

    ls *.mp3 | awk ‘{print “afplay \”” $0 “\””}’ | bash

    • Bla
      January 6, 2017

      How about:

      afplay *.mp3

      • Bla
        January 6, 2017

        Ah I just realized afplay can only take one file at a time.

        Then this would be better:

        # Recursive:
        find . -name \*.mp3 -exec afplay {} \;

        # Non-recursive:
        find *.mp3 -prune -type f -exec afplay {} \;

  6. blu
    December 18, 2017

    From your current directory:

    for i in *mp3; do if [ -e “$i” ]; then afplay “$i”; fi; done

    don’t know why but for some reason I wouldn’t want to pipe it into bash again.

    you can use some globbing to specify the songs you want.

Leave a Reply




Back to top
mobile desktop