Can `ls` show file sizes?

0144

Yes, the ls command can show file sizes when used with specific options.

Common Options for Displaying File Sizes:

  • -l: This option provides a detailed listing, including file sizes in bytes.
  • -h: When combined with -l, this option makes file sizes human-readable (e.g., KB, MB).

Example:

To display file sizes in a detailed format:

ls -lh

This command will list files with their sizes in a format that's easier to read.

0 Comments

no data
Be the first to share your comment!