Linux command ls -s question

Asked 2 years ago, Updated 2 years ago, 137 views

Can you tell me the unit of file size that comes out when I do Linux ls -s?

linux linux-kernel algorithm

2022-09-22 22:04

3 Answers

ls -s tells you how many blocks are in use.

The disk is not recorded in bytes, but in blocks. If you write a 1KB block, the disk will have four blocks, or 4KB, even if it is 3.3KB.


2022-09-22 22:04

Jung Doo-sik explained it well. In addition, ls -sk shows the allocated size in kilobyte units.


2022-09-22 22:04

Additionally, if ls -lh is used, KB and MB are attached to show.


2022-09-22 22:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.