File sizes are shown in bytes when the -h option is not used with the ls command. By default, when you run ls -l, the sizes are displayed in bytes.
Example:
When you run:
ls -l
The output might look like this:
-rw-r--r-- 1 user group 1234 Jan 01 12:00 file.txt
Here, 1234 indicates the file size in bytes.
When to Use:
- If you want to see file sizes in bytes, simply use
ls -l. - If you prefer a more readable format (e.g., KB, MB), use
ls -lh.
If you have more questions or need further assistance, feel free to ask!
