# Reading BIND zone files



## zhura (Oct 5, 2015)

My zone files, transferred from win2003srv, looks in console vi something like:

```
^@^@^@^B^@^@^@^AV^R$^S^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@Z^@^A^@^F^@^@^@^@^N^P^@^@^@^A^@^X^A0^C168^C192^Gin-addr^Darpa^@^@,^Ept1c8  galaktika^Elocal^@^@^@^@@B^
@^@^C\x84^@^@^BX^@^AQ\x80^@^@^N^P^@^@^@\x94^@^A^@^B^@^@^@^@^N^P^@^@^@^D^@^X^A0^C168^C192^Gin-addr^Darpa^@^@^W^Ept1c8  galaktika^Elocal^@^@^W^Esrv57  gal
aktika^Elocal^@^@^X^Fsrv1c8  galaktika^Elocal^@^@^Z^Hbsdsrv10  galaktika^Elocal^@^@^@^@N^@^A^@^L^@^@^@^@\xa8\xc0^@^@^@^A^@^\^C100^A0^C168^C192^Gin
-addr^Darpa^@^@^\
```
Help me please. How can I make it readable?


----------



## ab2k (Nov 20, 2015)

zhura said:


> My zone files, transferred from win2003srv, looks in console vi something like:
> 
> ```
> ^@^@^@^B^@^@^@^AV^R$^S^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@Z^@^A^@^F^@^@^@^@^N^P^@^@^@^A^@^X^A0^C168^C192^Gin-addr^Darpa^@^@,^Ept1c8  galaktika^Elocal^@^@^@^@@B^
> ...



Hello, received zones in latest dns/bind are now keeped in raw format. You must use `named-compilezone` utility to convert it.

To convert raw zone file to text file:

```
named-compilezone -f raw -F text -o example.net.textfile example.net example.net.named.db.file
```

To convert text file to raw zone file:

```
named-compilezone -f text -F raw -o example.net.raw example.net example.net.textfile
```


----------

