Rsync to /dev/null overwrites it

by Eilbron   Last Updated September 11, 2019 18:00 PM - source

I am seeing a random behavior when copying from one server to another using rsync to the /dev/null of the destination server. This is as part my network performance testing, and I want to avoid Disk I/O in my testings. I have the same script in all my servers, but for some of them the destination /dev/null gets overwritten and becomes a regular file, and that breaks other things.

For the same server scp does not overwrite the destination /dev/null.

Before: [[email protected] ~]# ls -l /dev/null crw-rw-rw-. 1 root root 1, 3 Sep 11 09:24 /dev/null

Here is my rsync command: rsync -v -e ssh --progress 500MB [email protected]:/dev/null

After: [[email protected] ~]# ls -l /dev/null -rw-r--r--. 1 root root 104857600 Sep 11 10:09 /dev/null

Doing scp to the same server, does not break /dev/null

scp 500MB [email protected]:/dev/null

Any idea why causes the random behavior? My servers are a mix of CentOS6 and 7

Thank You, Eilbron

Related Questions

Analyzing server performance

Updated May 03, 2016 10:00 AM

Ec2 c4.large not responding

Updated October 23, 2016 09:00 AM

Task Manager shows high kernel time

Updated July 19, 2016 08:01 AM