• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

compsize: command not found

by Deepika

The compsize command is a utility in Linux that is used to calculate and display the compression ratios of files in a btrfs filesystem. The compsize command reads the specified filesystem and calculates the compression ratio of each file in the filesystem, displaying the results in a table.

To calculate the compression ratios of all files in the current filesystem, use the following command:

# compsize .

This will display the compression ratios of all files in the current filesystem in a table.

If you encounter the below error while running the command compsize:

compsize: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install btrfs-compsize
Ubuntu apt-get install btrfs-compsize
Kali Linux apt-get install btrfs-compsize
Fedora dnf install compsize

compsize Command Examples

1. Calculate the current compression ratio for a file or directory:

# sudo compsize path/to/file_or_directory

2. Don’t traverse filesystem boundaries:

# sudo compsize --one-file-system path/to/file_or_directory

3. Show raw byte counts instead of human-readable sizes:

# sudo compsize --bytes path/to/file_or_directory

Filed Under: Linux

Some more articles you might also be interested in …

  1. dos2unix: command not found
  2. ceph Command Examples in Linux
  3. logstash Command Examples
  4. virsh: command not found
  5. Secure Shell: Chrome Web Browser ssh client
  6. rspamc: command not found
  7. CentOS / RHEL : How to Recover from deleted /etc/passwd file
  8. eqn: Equation preprocessor for the groff (GNU Troff) document formatting system
  9. asciiart Command Examples in Linux
  10. firejail: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright