Today, when writing a script, we found a strange problem: when we use cp to copy all the files in the current directory to the target directory, the source and target directories are of different sizes. I didn't pay attention to this problem until I checked some materials to find out that the format I used was incorrect ,. 1. cp preparation is a copy. The simplest way to use it is: cpoldfilenewfile. but in this way, only files can be copied, but directories cannot be copied. Therefore, the following is usually used: cp-rold/new/, the old directory is copied to the new directory.
Today, when writing a script, we found a strange problem: when we use cp to copy all the files in the current directory to the target directory, the source and target directories are of different sizes. I didn't pay attention to this problem until I checked some materials to find out that the format I used was incorrect,