Question: I have a directory tree that in each directory there is a file called zero-file  

I want this file to be initialized with specific number of zero's for example 10000000000.  

I want to write ASCII character '0'  

I found 2 solutions for this  

```
for i in `seq 1 10000000000`
do
    echo -n 0 >> zero-file
done 

```

The second one is this: I initialized a file called base and the copy this file in each directory

```
cp base zero-file

```

This was faster. 
I want to know if there exist a faster way.

Answer: 
To write zeros to zero-file:

```
dd if=/dev/zero bs=1 count=10000000000 | tr '\0' '0' > zero-file

```
according to @Cyrus answer: 

```
dd if=/dev/zero bs=1 count=10000000000 | tr '\0' '0' > zero-file

```

you said that:

> 
> I have a directory tree that in **each directory** there is a file called
>  zero-file
> 
> 
> 

so you have to do this command several time  

My idea is to save it in a file once and for the other directories use that file that contains those 0's.

```
#for the first time
$ dd if=/dev/zero bs=1 count=10000000000 | tr '\0' '0' > zero-file
#for other directories
$ dd if=../zero-file of=zero-file bs=1 count=10000000000

```