---
title: "netcat usage sample"
author: "unixboy"
date: "2009-11-28T18:33:36Z"
tags: []
slug: "netcat-usage-sample"
draft: false
lastmod: "2009-11-28T18:33:36Z"
id: 532498
url: "https://unixboy.iteye.com/blog/532498"
---

This page documents various techniques that people have found useful for transferring disk images to a SAN target.

#### [netcat]()

If the source machine does only have one HDD which has been used completely, netcat can be used to transfer the image to the target in one step:

 

```
 On the storage Server:
 nc -l -p 30000 | dd of=/path/to/image/file.img
```

```
 On the Netboot-Box:
 dd if=/dev/sdX bs=8225280 count=1825 | nc <SAN-IP> 30000
```

 

This command will extract the same portion of the disk directly to the server. The Port (30000) can be chosen free but has to be the same on both sides.