简体   繁体   中英

How can two 100% identical files have different sizes?

I have two 100% identical empty .sh shell script files on Mac:

  • encrypt.sh: 299 bytes
  • decrypt.sh: 13 bytes (Actually this size is correct, since I have 13 bytes: 11 character + two new line)

The contents of encrypt.sh and its hexdump: 加密

The contents of decrypt.sh and its hexdump: 解密

The file info window of encrypt.sh :

加密信息

The file info window of decrypt.sh :

解密信息

They have the exact same hexdump, then how is it possible that they have different sizes?

Mac OS X file system is implementing forks, so the larger one is likely having something specific stored in its resource fork .

Use ls -l@ to get more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM