Skip to main content
Welcome guest. | Register | Login | Post

a thing's blog


I just spent an hour preparing a bug report on ALSA. It was giving strange permission errors if I wasn't root, even though I could play sound as normal users using OSS or writing directly to the sound device. Neither of those are good because only one sound can be playing at a time (when you try to play more you get "/dev/dsp: Device or resource busy").

Bash filenames


In Bash, when (possibly) dealing with a variable that contains a filename, be sure to doublequote it.


To type a lot of one character (or a backspace) when using Bourne Shell or Bash, hit Alt, enter the number of times to repeat, then hit the character to be repeated.

Clear console hotkey


Hit Ctrl+l (lowercase L, not uppercase i) to clear a console without typing out "clear".


Copy a file to host:
cat FILE|ssh HOST "cat ->FILE'S-LOCATION-ON-HOST"

Copy a file from a host to current host:
ssh HOST "cat FILE"|cat ->FILE'S-LOCATION-ON-CURRENT-HOST