So as I was learning about the filesystem and familiarizing myself, I came upon this interesting tidbit about /dev and how /dev/dsp can be particularly utilized.
/dev/dsp is essentially your speaker.
Take a command like so: [code]cat /etc/host.conf > /dev/dsp[/code]
You will hear something.
What was that?
It was your host.conf file!
Hopefully I wasn't the only one who didn't know this :rolleyes:
Ahaha that's pretty cool :). What happens if you do that with a sound file? Surely it wouldn't work since it's encoded.
[QUOTE=nos217;16815687]Ahaha that's pretty cool :). What happens if you do that with a sound file? Surely it wouldn't work since it's encoded.[/QUOTE]
Nah, it wouldn't work with mp3 and the likes, but raw audio files (unsigned wav?) may work, except they'd probably sound much quicker as it's ignoring the samplerate.
Also,
cat /dev/kmem > /dev/dsp - play the kernel memory!
sudo tcpdump -l -a -vv > /dev/dsp - play network traffic
cat /dev/fb0 > /dev/dsp - play what's currently on your screen (framebuffer)
cat /dev/sda > /dev/dsp - play your first hard drive (usually).
Distros using ALSA can supplement "> /dev/dsp" with "| aplay", and with Ubuntu, "| paplay" (if you're using PulseAudio).
Oh, thanks - I like the network traffic one.
Listen to intertubes!
Ran that in the terminal and didn't hear anything? Just an endlessly growing line of "~~~~~~~~~~~~~"
Did I do something wrong? On Linux Mint 32-bit GNOME.
Internet goes RRRRRRRRRRRRRRRRRRRRRRRRRRR.
Its horrible then I just exited the terminal forgot to stop it and I had to restart.
Ran a random tar file sounded like white noise with a Ping every once in awhile.
[QUOTE=Bonzai11;16860980]Internet goes RRRRRRRRRRRRRRRRRRRRRRRRRRR.
Its horrible then I just exited the terminal forgot to stop it and I had to restart.
Ran a random tar file sounded like white noise with a Ping every once in awhile.[/QUOTE]
[code]killall cat[/code]
[QUOTE=IpHa;16861344][code]killall cat[/code][/QUOTE]
How evil of you. Poor kitties.
Hahahahaha.
Sorry, you need to Log In to post a reply to this thread.