How to read the output of ls -al?

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
WadeWayne
Level 2
Level 2
Posts: 94
Joined: Sat Mar 21, 2020 10:08 am
Location: Kepler-438b

How to read the output of ls -al?

Post by WadeWayne »

Image

Could someone please tell me what these are and how to read them, please? :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Image
Distro: Linux Mint 19.3
DE: Cinnamon 4.4.8
User avatar
karlchen
Level 23
Level 23
Posts: 18209
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to read the output of ls -al?

Post by karlchen »

The marked column holds the filesizes in bytes.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: How to read the output of ls -al?

Post by rene »

.... and note that in the case of directories you may think of the directory as itself "a file with directory entries", i.e., with the files, directories, etcetera occupying said directory. The size of any such "directory-file" determines / is determined by how many such entries it holds, and is on ext4 allocated disk-space in chuncks of the filesystem's blocksize, 4K normally, which is then the reason why you see the directory-sizes all being integer multiples of 4K.
User avatar
all41
Level 19
Level 19
Posts: 9518
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: How to read the output of ls -al?

Post by all41 »

ls -lah
this will display the size in a 'human' recognizable format
Everything in life was difficult before it became easy.
WadeWayne
Level 2
Level 2
Posts: 94
Joined: Sat Mar 21, 2020 10:08 am
Location: Kepler-438b

Re: How to read the output of ls -al?

Post by WadeWayne »

karlchen wrote: Tue May 04, 2021 10:31 am The marked column holds the filesizes in bytes.
Thanks, karlchen. I get it now! :)
Image
Distro: Linux Mint 19.3
DE: Cinnamon 4.4.8
Locked

Return to “Scripts & Bash”