Monthly Archives: September 2010

Linux: How To Find Which Package Contains A Specific File

Fedora: # rpm -qf /bin/bash bash-3.0-19.3 Debian/Ubuntu: # apt-get install apt-file # apt-file update # apt-file search perl.pm libapache-mod-perl: usr/lib/perl5/mod_perl.pm …

Posted in Linux | Leave a comment

Linux: Where is the “replace” command?

“replace” lives in the the “mysql-server” package Fedora: yum install -y mysql-server Debian/Ubuntu: apt-get install -y mysql-server Run it: $ replace replace: No replace options given

Posted in Linux | 1 Comment

Linux: How To Setup Reverse SSH Tunnel

Let’s assume you’re trying to SSH from your home machine into your office machine, but inbound port 22 is blocked by your office firewall. Here’s how to get around it: On your office machine: $ ssh -fnNTR 1234:localhost:22 my-home-username@my-home-domain.com What … Continue reading

Posted in Linux, SSH | Leave a comment

subversion: Missing Dependency: libneon.so.25 is needed by package subversion-1.6.12-0.1.el5.rf.i386 (rpmforge)

If you ever run into this problem: # yum install -y subversion Loaded plugins: fastestmirror … –> Finished Dependency Resolution subversion-1.6.12-0.1.el5.rf.i386 from rpmforge has depsolving problems –> Missing Dependency: libneon.so.25 is needed by package subversion-1.6.12-0.1.el5.rf.i386 (rpmforge) subversion-1.6.12-0.1.el5.rf.i386 from rpmforge has … Continue reading

Posted in Errors, Linux | Leave a comment

daemontools: /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in envdir.o

Solution for fixing compilation error for daemontools. This solution also fixes: /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in tcpserver.o when compiling ucspi-tcp. Edit this file: admin/daemontools-0.76/src/conf-cc Add this to the end of the gcc line: … Continue reading

Posted in DNS, Errors, Linux | 4 Comments

Ubuntu: How To Find Ubuntu And Kernel Version

$ cat /etc/issue Ubuntu 10.04.1 LTS \n \l $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION=”Ubuntu 10.04.1 LTS” uname -a : print all information uname -r : print the kernel release uname -v : print the kernel version uname -o : … Continue reading

Posted in Linux | Leave a comment

Linux: TinyDNS Data File Syntax

. defines an A, NS, and SOA record Z defines the zone record & defines a name server @ defines an MX record + defines an A record ^ defines a PTR record = defines BOTH an A record and … Continue reading

Posted in DNS, Linux | Leave a comment

Linux: How To Low-Level Format A Hard Drive

If you need to format a drive to erase all of your Nobel-prize-winning research, here’s how to do it. First, identify the drive by device name: # df … /dev/sdb1 731886588 1742280 730144308 1% /media/My Whatever Drive Then, use dd … Continue reading

Posted in Linux | Leave a comment

Linux: How To Use Expect

Here’s a simple expect example: #!/usr/bin/expect -f spawn some-script-requiring-input.sh expect “Enter passphrase:” send ThisIsMyPassword\n interact Another example using variables: #!/usr/bin/expect -f set myhost MyCrazyBox spawn ssh $myhost “ls” expect $myhost send “MyPassword” interact Another example installing a printer: #!/usr/bin/expect -f … Continue reading

Posted in Linux | Leave a comment