You probably want do do an ls -il to see what really happened.

Before you delete test1, do
    ls -li test[12]/*

On Wed, 16 Jul 2014, David Wagle wrote:

> I just confirmed that this is what happens.
>
> method:
>
> $ mkdir test1
> $ cd test1
> $ echo "a;ljfasldja;ldkfja;sldkfjsd;lfka;;slk" > file1
> $ cd ..
> $ du
> 4     ./test1
> 20    .
> $ cp -rl test1 test2
> $ du
> 4     ./test1
> 0     ./test2
> 20    .
> $ rm -rf ./test1
> $ cd test2
> $ ls -l
> total 4
> -rw-r--r-- 1 david users 33 Jul 16 15:17 file1
> $ cd ..
> $ du
>
> 4	./test2
> 20	.
>
>
> On 07/16/2014 03:12 PM, Jeff Chapin wrote:
>> cp -rl will achieve the same result for directories, I believe. It's a
>> recursive copy -- but instead of actually copying data, creates hard links.
>>
>>
>> On Wed, Jul 16, 2014 at 2:14 PM, gregrwm <tclug1 at whitleymott.net
>> <mailto:tclug1 at whitleymott.net>> wrote:
>>
>>    >create a hard link to the new file, then remove the old
>>
>>     for directories?
>>
>>
>> --
>> Jeff Chapin
>> President, CedarLug, retired
>> President, UNIPC, "I'll get around to it"
>> President, UNI Scuba Club
>> Senator, NISG, retired
>>
>>