Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Here is an example I saw in a webpage which uses IO redirection to make the audio device make sound.

less sound.wav > /dev/audio

But I cannot do it in Fedora. It outputs the input data format is wrong.

Any hint?

share|improve this question
add comment

1 Answer

less is a pager, typically used like less file to provide a scrollable view of the file's content, that is, a console user interface. Thus redirecting the output of less doesn't make much sense. The error you get, however, is because less is not good at displaying binary data, e.g. a .wav file.

If you want the file's content input into the device, cat audio.wav > /dev/audio is more promising, since cat does just that, print the file's content to stdout. (I'm not sure if it works that way, though.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.