问题原文
原帖链接 · Ali Sheikhpour · CC BY-SA 4.0
When I backup my files using Filezilla, as soon as a file is downloaded, it has different file size with the original file size on the server. I am not sure if it is normal or a kind of virus or server compression? If it is a server-side compression where can I disable this setting so I can make a directory comparison using FTP softwares?
My website is wordpress and the shared hosting control panel is cPanel.
社区高分解答
原帖链接 · gnicko · CC BY-SA 4.0
It isn't a virus or some sort of FTP compression.
It could be a couple of things going on:
For example, if the server is running Linux and your desktop is running Windows it is likely that your server and desktop are set to display file sizes differently.
In some operating systems, file sizes tend to be expressed mebibytes (e.g. 1 GiB = 1,024 MiB) while in other operating systems sizes are generally expressed in megabytes (e.g. 1GB = 1,000 MB). This shows the relationships between the two systems.
Another thing that could be going on is that some operating systems will sometimes report the "true file size" and some will tend to report the "file size on disk".
These can be different numbers based on the file allocation unit size of the hard drive, etc. When a hard drive is formatted with larger sized allocation units, there's more difference between the actual file size and the size on disk.
In a very "loose" example, if the allocation unit is 4kb a 10kb file will take up three blocks (or 12kb "on the disk"), but if the allocation unit is 8kb, the same 10kb file will take up two blocks (and be 16kb "on the disk") or if the allocation unit is 2kb, it will take up 5 blocks (and be 10kb on the disk)...
In either of these cases, as long as the files aren't corrupted, it's nothing to concern yourself with. It's just a "that's how it is" kind of situation.
FileZilla (and probably most other FTP programs) can be set to make the conversion automatically somewhere in the configuration dialogs. Here is a screenshot of my FileZilla configuration showing the pertinent settings. Yours may vary, but I'd suspect it's at least similar:
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
