How To Install sloccount on Fedora 34

sloccount is Measures source lines of code (SLOC) in programs

Introduction

In this tutorial we learn how to install sloccount on Fedora 34.

What is sloccount

SLOCCount (pronounced “sloc-count”) is a suite of programs for counting physical source lines of code (SLOC) in potentially large software systems. SLOCCount can be used to generate reports in different formats for use by report-generating tools.

We can use yum or dnf to install sloccount on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install sloccount.

Install sloccount on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sloccount using dnf by running the following command:

sudo dnf -y install sloccount

Install sloccount on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install sloccount using yum by running the following command:

sudo yum -y install sloccount

How To Uninstall sloccount on Fedora 34

To uninstall only the sloccount package we can use the following command:

sudo dnf remove sloccount

sloccount Package Contents on Fedora 34

/usr/bin/ada_count
/usr/bin/asm_count
/usr/bin/awk_count
/usr/bin/break_filelist
/usr/bin/c_count
/usr/bin/cobol_count
/usr/bin/compute_all
/usr/bin/compute_sloc_lang
/usr/bin/count_extensions
/usr/bin/count_unknown_ext
/usr/bin/csh_count
/usr/bin/exp_count
/usr/bin/f90_count
/usr/bin/fortran_count
/usr/bin/generic_count
/usr/bin/get_sloc
/usr/bin/get_sloc_details
/usr/bin/haskell_count
/usr/bin/java_count
/usr/bin/jsp_count
/usr/bin/lex_count
/usr/bin/lexcount1
/usr/bin/lisp_count
/usr/bin/make_filelists
/usr/bin/makefile_count
/usr/bin/ml_count
/usr/bin/modula3_count
/usr/bin/objc_count
/usr/bin/pascal_count
/usr/bin/perl_count
/usr/bin/php_count
/usr/bin/print_sum
/usr/bin/python_count
/usr/bin/ruby_count
/usr/bin/sed_count
/usr/bin/sh_count
/usr/bin/show_filecount
/usr/bin/sloccount
/usr/bin/sql_count
/usr/bin/tcl_count
/usr/lib/.build-id
/usr/lib/.build-id/14
/usr/lib/.build-id/14/6ed162ad6306adaf72fb49fbf647fda70a0669
/usr/lib/.build-id/1e
/usr/lib/.build-id/1e/65f87d5f6623c0899bac7fde3b02eda1ba7625
/usr/lib/.build-id/6e
/usr/lib/.build-id/6e/429569969a62a7e1f4acb4d5ab3c6d0be32c45
/usr/lib/.build-id/97
/usr/lib/.build-id/97/a19f0e465bf00822d442a717432461213ffb82
/usr/lib/.build-id/af
/usr/lib/.build-id/af/bfe9445ac55b89a89f01d1f351648bcb292f8b
/usr/lib/.build-id/af/bfe9445ac55b89a89f01d1f351648bcb292f8b.1
/usr/lib/.build-id/dd
/usr/lib/.build-id/dd/cc111857ad0e68198fde2b19f6a2ccc499ae57
/usr/share/doc/sloccount
/usr/share/doc/sloccount/COPYING
/usr/share/doc/sloccount/ChangeLog
/usr/share/doc/sloccount/README
/usr/share/doc/sloccount/TODO
/usr/share/doc/sloccount/sloccount.html
/usr/share/man/man1/sloccount.1.gz

References

Summary

In this tutorial we learn how to install sloccount on Fedora 34 using yum and dnf.