Best Answer: How Do You Check a Space on a Specific Directory in Linux?
Contents

By default, the du command shows the disk space used by the directory or file. To find the apparent size of a directory, use the –apparent-size option. The “apparent size” of a file is how much data is actually in the file.

How do I check disk space on a specific directory in Linux?

How to check free disk space in Linux

  1. df. The df command stands for “disk-free,” and shows available and used disk space on the Linux system. …
  2. du. The Linux Terminal. …
  3. ls -al. ls -al lists the entire contents, along with their size, of a particular directory. …
  4. stat. …
  5. fdisk -l.

3 янв. 2020 г.

How do I check directory space?

If you want to check the total disk space used by a particular directory, use the -s flag. Here, -s flag indicates summary. To display the grand total of directories, add -c flag with du -sh command.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest