List Files with size Print

  • 0

ls -lAShr

OR

ls -la /var/www/html/admin_portal/

-S To list all files and sort them by size. By default, it displays output in descending order (biggest to smallest in size).
-l flag means long listing
-a tells to list all files including (.) or hidden files. To avoid showing the . and .. files, use the -A option instead of -a.
-h to output the file sizes in human-readable format
-r to sort in reverse order
-R list subdirectories recursively


Was this answer helpful?

« Back

["\r\n