[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help: How can I recover /etc/aliases from /etc/aliases.db?



On Wed, 4 Mar 1998, George Bonser wrote:

> If you are using dbm, you might be able to use the db_dump command.
> 
> Here is a little piece of the manpage for it:
> 
> NAME
>        db_dump - the DB database dump utility

Thanx for the tip.
In the meantime, I've came up with an alternate way to do it:

---cut here---
#!/usr/bin/perl

$db="aliases.db";
use DB_File;
use Fcntl qw/O_RDWR O_CREAT/;

tie %popdb,DB_File,$db,O_RDWR|O_CREAT,0640,$DB_HASH
      or die "can't tie $db: $!\n";
while (($key,$val) = each %popdb) {
      print "$key:      $val\n";
}
untie %popdb;
exit 0;
---cut here---

	Cordialement,


--
- Vincent RENARDIAS                 vincent@{waw.com,pipo.com,debian.org} -
- Debian/GNU Linux:           Pipo:                    WAW:               -
- http://www.fr.debian.org    http://www.pipo.com      http://www.waw.com -
---------------------------------------------------------------------------
- "La fonctionnalite Son Visuel vous delivre des avertissements visuels." -
-                          [Message durant l'installation de Windows95] :wq


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: