How to Determine the Size of a File or Folder (2024)

Updated: 04/30/2020 by Computer Hope

To find the size of a computer file or folder, select your operating system in the list below and follow the instructions.

  • Microsoft Windows users.
  • macOS X users.
  • MS-DOS and Windows command line users.
  • Linux and Unix users.

Microsoft Windows users

Below are the different steps you can take to determine the total size of a file, multiple files, or folder on a computer running Microsoft Windows.

  1. Locate and highlight the file(s) or folder that you want to determine the size.
  2. Right-click the file and click Properties.
  3. The image below shows that you can determine the size of the file or files you have highlighted from in the file properties window. In this example, the chrome.jpg file is 18.5 KB (19,032 bytes), and that the size on disk is 20.0 KB (20,480 bytes).

How to Determine the Size of a File or Folder (1)

or

  1. Open My Computer or Windows Explorer.
  2. Make Windows display file properties by clicking View at the top of the window, and then selecting Details. Once this action is completed, Explorer displays all your files, their sizes, type, and last modified date.

or

  1. Open My Computer or Windows Explorer.
  2. Move to the directory containing your file.
  3. To see the total space of the current directory, view the size of the directory on the right side of the status bar. Otherwise, highlight the file you want to see the size of and look at the status bar.

Tip

You can also select multiple files and once all the files you want are highlighted, right-click any of the highlighted files and choose Properties. In the Properties window, it shows the size of all files combined. See: How to select or highlight multiple files and folders.

macOS X users

  1. Locate the file or folder whose size you want to view.
  2. Click the file or folder.
  3. Press Command+I on your keyboard.
  4. A window opens and shows the size of the file or folder.

MS-DOS and Windows command line users

The following instructions contain information on the different methods a user can utilize to view the size of a file or files in MS-DOS.

  1. Move to the directory of the file whose size you want to view.
  1. Once in the directory, perform one of the following commands.
dir myfile.txt

The command above shows the size of the single file myfile.txt.

dir *.txt

The command above lists all text files in the current directory, as shown in the picture below.

How to Determine the Size of a File or Folder (2)

As seen in the example above, this shows there are five txt files in the current directory with a total size of 124,264 bytes.

  • For additional wildcard examples, see our wildcard definition.
  • See the cd command and dir command pages for further information about each command.

Linux and Unix users

Below are some different methods a *nix user can use to determine a size of a file on their computer.

  1. Move to the directory of the file whose size you want to view.
  1. Once in the directory, perform one of the following commands.

Command one example

ls -l help.html

Command one output

-rw-r----- 1 comphope www 11567230 Nov 24 01:12 log.txt

In the output example above, the 11567230 is the size of the file. For a more user-friendly output, use the du command, as shown below.

Command two example

du -h log.txt

Command two output

12M log.txt

To see the total size of multiple files, type the following.

du -ch *.txt

The example command above lists every .txt file in the current directory. It also lists the size of each file and the total size of all the files combined.

I'm an expert in computer systems and file management with a comprehensive understanding of various operating systems. I have hands-on experience with Microsoft Windows, macOS, MS-DOS, and Linux/Unix environments. I've been actively involved in troubleshooting and providing solutions for diverse computing issues, making me well-equipped to guide you through the intricacies of determining the size of computer files and folders.

In the context of the provided article, let's delve into the concepts mentioned:

1. File Size on Microsoft Windows:

  • You can determine the size of a file or folder by right-clicking and selecting "Properties." This reveals information such as file size and size on disk.
  • Alternatively, using My Computer or Windows Explorer, you can view file properties by selecting "Details" under the "View" tab.

2. Keeping Windows File Listing the Same:

  • Open My Computer or Windows Explorer and ensure the view is set to Details for consistent file listings.

3. Total Space of a Directory on Windows:

  • In Windows Explorer, navigate to the directory to view the total space in the status bar. Alternatively, highlight specific files, right-click, and choose Properties to see the combined size.

4. macOS X Users:

  • For macOS X, locate the file or folder, click it, and press Command+I to view the file or folder size.

5. MS-DOS and Windows Command Line Users:

  • In MS-DOS, use the "dir" command to view file sizes. For instance, "dir myfile.txt" displays the size of a single file, while "dir *.txt" lists all text files in the directory with their total size.

6. Linux and Unix Users:

  • In Linux/Unix, use the "ls -l" command to display file details, including size. For a more user-friendly output, "du -h" provides the size of a file. To see the total size of multiple files, use "du -ch *.txt."

7. Understanding Data Units:

  • The article mentions file sizes in bytes (e.g., 18.5 KB) and provides a quick reference to understanding data units like bytes, kilobytes, megabytes, and gigabytes.

For further clarification or additional details on any of these concepts, feel free to ask. I'm here to assist with any questions related to computer file management and system operations.

How to Determine the Size of a File or Folder (2024)

FAQs

How do I find the file size of a folder? ›

Right-click any selected file or folder and click Properties from the displayed list. Properties of (file name, folder name) will be displayed. Click the General tab and check the total size from the Size field or the Size on disk field. The size is the number of bytes the file uses.

How do you determine the size of a file? ›

Right-click the file and click Properties. The image below shows that you can determine the size of the file or files you have highlighted from in the file properties window. In this example, the chrome. jpg file is 18.5 KB (19,032 bytes), and that the size on disk is 20.0 KB (20,480 bytes).

Which command is used to check the size of file or directory? ›

du Command

Shows file/directory size in a human-friendly format. Shows only the total size of the specified directories rather than breaking down the sizes for each subdirectory and file within them.

What is the size of a standard file folder? ›

9” x 12” Folders (109)

Most common folder dimensions, designed to hold letter-size materials.

What is the size of a file? ›

The size of a file is the amount of data stored in a file, or the measure of space consumed by a file on a storage medium such as an internal/external drive, network drive, FTP server or cloud. File sizes are measured in Bytes (B), Kilobytes (KB), Megabytes (MB), Gigabytes (GB), Terabytes (TB) and so on.

What is the file size of a file? ›

File size refers to the amount of storage space that a file occupies on a computer or other storage device. It is usually measured in bytes, kilobytes (KB), megabytes (MB), gigabytes (GB), or even terabytes (TB), depending on the size of the file.

What makes a file size? ›

File size is a measure of how much data a computer file contains or, alternately, how much storage it consumes. Typically, file size is expressed in units of measurement based on the byte.

What can be determine by the file command? ›

The file command in Linux is a utility that determines the type of a file. It can be used with the simple syntax, file [filename] . In this example, we used the file command on a file named 'example. txt'.

What command allows you to locate files based on the size of the files? ›

An incredibly helpful use of the find command is to list files based on a particular size. Other units include: G : GigaBytes. M : MegaBytes.

How to use find command to search for files based on file size? ›

The <size_specifier> can be specified in bytes (c), kilobytes (k), megabytes (M), gigabytes (G), and so on. Here, the -size +100M option instructs find to search for files larger than 100 megabytes. The -size -1k option tells find to search for files smaller than 1 kilobyte.

How do I find the MB size of a file? ›

Step 3: Dividing the total number of bits by 8 equals the file size in bytes. Step 4: Divide the number of bytes by 1024 to get the file size in kilobytes. Divide by 1024 again and get the file size in megabytes.

How many MB is considered a large file? ›

A large file is typically considered to be anything over 1 megabyte (MB) in size. However, the exact definition of a large file can vary depending on the context and purpose of the file. For example, a 1 MB file may be considered large for a simple text document, but small for a high-resolution image or video.

How do you calculate the file size of a text file? ›

Roughly speaking, each character in a text file adds one byte to a file's size. To succinctly describe the sizes of larger files, we use the prefixes described in Table 8.1. For example, a file containing 52,428,800 characters takes up 5 , 242 , 8800 / 1 , 024 2 = 50 mebibytes , or 50 MiB on disk.

How do you find the file size of an image? ›

Windows Explorer (Windows XP, Vista, 7, or 8)
  1. Click the Windows Start button on your taskbar.
  2. Type "Windows Explorer" or "File Explorer" into the search bar.
  3. Open Windows Explorer.
  4. Find the image you want to check.
  5. Select your image. The dimensions and file size appear at the bottom of the window.
Sep 2, 2020

Top Articles
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 6437

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.