Linux - Ls command to find file size, List files comsuming more space
Ls command to find file size
Normally we list the files by using ls command, but most of the time we use du command to find the file size of a file. The ls command can also be used to find the file size. The below is a simple example to list the file size of files in human readable format using ls command.# ls -aslhS | headOUTPUT:
total 2.6G 2.1G -rw------- 1 root root 2.1G Dec 2 12:39 local1.log 386M -rw------- 1 root root 386M Jan 20 08:01 kern.log 84K -rw-r--r-- 1 root root 258M Jan 20 09:40 lastlog 112M -rw------- 1 root root 112M Jan 20 09:41 cron.log 44K -rw------- 1 root root 29M Jan 3 11:49 faillog 4.8M -rw------- 1 root root 4.8M Jan 20 09:30 daemon.log 3.3M -rw------- 1 root root 3.3M Jan 20 09:23 mail.log
The topic on Linux - Ls command to find file size is posted by - Math
Hope you have enjoyed, Linux - Ls command to find file sizeThanks for your time