November 2008

The Archives

  • 11.10.08
    Find files ending in mp3 cmd | rafacas | (0)
    $ find / -name "*.mp3" Search for (starting at the root / directory) all the files ending in ".mp3"
  • 11.08.08
    Is this a tty? shell | pfortuny | (0)
    That is a funny question to ask if you are a human (because you *should* know the answer). But it is not that dumb for a system. As a matter of fact, among the multiple tests the shell admits (man 1 test), there is a -t which serves specifically for that: $ test -t 0 returns 0 (that is, success or true in shell jargon) if the standard input (file descriptor 0) is open and is associated with a terminal. So, unless things are going pretty bad, the following $ test -t 0 && echo $? Should always print a 0. However, when a file ...
  • 11.06.08
    man man cmd | pfortuny | (0)
    $ man man Some useful info not to be underestimated.
  • 11.04.08
    Changing the MAC address of an interface cmd | rafacas | (0)
    # ifconfig eth0 hw ether 11:22:33:44:FF:AA Set the hardware address of the eth0 interface (the device driver has to support this operation). The hardware class (ethernet in the example) is specified with the ether parameter.
  • 11.02.08
    pf, OpenBSD’s [p]acket [f]ilter (1) network, security | pfortuny | (1)
    When anyone has asked me in the last two years about installing a firewall at his LAN's border, I have always recommended them OpenBSD's packet filter pf. I discovered OpenBSD a couple of years ago while designing a hall of residence's local network and firewall. I was by then quite tired of Linux's netfilter/iptables and the first time I read about pf, I fell in love with it. We are now more accustomed to this, but when I saw that you could write firewall rules like pass in on $ext_if proto tcp from any port 80 to $ext_if I knew I had found ...