By default, echostarts a new line after it displays the text it needs to write to the terminal window. RELATED: How to Use the ls Command to List Files and Directories on Linux That tallies with the output from ls and agrees with the file length of two bytes. It says the size is four, but four of what? There Are Blocks, and Then There Are Blocks Now, we’ll use the du command to look at the file size: du geek.txt Pcmark 10 file size how to# When du reports file sizes in blocks, the size it uses depends on several factors. If you don’t force du to use a particular block size, it follows a set of rules to decide which one to use.įirst, it checks the following environment variables: You can specify which block size it should use on the command line. If any of these exist, the block size is set, and du stops checking. If none are set, du defaults to a block size of 1,024 bytes. Unless, that is, an environment variable called POSIXLY_CORRECT is set. If that’s the case, du defaults to a block size of 512 bytes. So, how do we find out which one is in use? You can check each environment variable to work it out, but there’s a quicker way. Let’s compare the results to the block size the file system uses instead. To discover the block size the file system uses, we’ll use the tune2fs program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |