Because everything in linux / Unix / MacOS X is a file, you can do some interesting things with devices, like send data straight to them. Your sound card is typicaly denoted by /dev/dsp. There is another file that is a (pseudo)random number generator and it is /dev/random or /dev/urandom. There is also a program that has a primary purpose of the low-level copying and conversion of raw data. So you can pipe garbage to your soundcard with this:
dd if=/dev/urandom of=/dev/dsp
or
sudo dd if=/dev/urandom of=/dev/dsp
This will work in cygwin as well.
Friday, December 19, 2008
Stupid nix trix: Making awful noises, or testing your speakers in linux
Saturday, December 13, 2008
stupid nix trix: simple stupid ssh piping
I am going to start a feature called stupid nix trix, that will be one liner helpful commands that you can do on *nix ( unix, linux, mac ) machines.
So let's say you have a file on your home nix machine and you need it on your server, well if ssh is enabled on that server you don't need to break open filezilla just to sftp that file across, you can do it in one line:
Hypothetical:
cat /orignalDir/filename | ssh usernameforserver@server.tld "cat > /destinationDir/filename"
Real World:
cat $HOME/.ssh/id_rsa.pub | ssh root@irc.9unk0r.com "cat > /tmp/id_rsa.pub"
Thursday, December 4, 2008
Stupid nix trix: Finger me write, how to talk to someone on a diffrent tty in *nix
You can communicate to other users on your *nix box using write. While at the command prompt you can type:
$write username
Where username is the name of the user, such as root or bsdpunk.
If multiple of the same user are logged in you can specify the tty you want to use.
Use the finger command to find out what tty the other user is on.
$finger
Under finger in a bsd enviroment you will see something like p4 under tty.
$write username tty
The username may be root or bsdpunk or something and the tty if as listed above will be ttyp4.