Linux / Documentation
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 7,566 files with 771,048 lines of code.
    • 44 very long files (89,002 lines of code)
    • 142 long files (95,077 lines of code)
    • 618 medium size files (183,988 lines of codeclsfd_ftr_w_mp_ins)
    • 1,171 small files (164,571 lines of code)
    • 5,591 very small files (238,410 lines of code)
11% | 12% | 23% | 21% | 30%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
rst15% | 18% | 31% | 19% | 15%
txt13% | 2% | 11% | 18% | 54%
yaml0% | 2% | 13% | 28% | 55%
asc0% | 100% | 0% | 0% | 0%
pl0% | 51% | 45% | 0% | 2%
py0% | 0% | 44% | 40% | 14%
awk0% | 0% | 0% | 100% | 0%
c0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
admin-guide26% | 21% | 24% | 13% | 13%
userspace-api22% | 17% | 20% | 17% | 21%
networking23% | 15% | 31% | 21% | 9%
trace49% | 26% | 12% | 8% | 2%
filesystems21% | 24% | 33% | 12% | 8%
virt49% | 11% | 17% | 11% | 9%
sound44% | 12% | 21% | 12% | 9%
RCU46% | 23% | 22% | 5% | 3%
driver-api11% | 24% | 31% | 17% | 15%
translations7% | 18% | 33% | 25% | 14%
scsi28% | 22% | 24% | 12% | 12%
ROOT65% | 0% | 23% | 8% | 1%
x8634% | 0% | 23% | 24% | 16%
security36% | 0% | 34% | 14% | 14%
kbuild38% | 18% | 20% | 15% | 7%
kernel-hacking65% | 34% | 0% | 0% | <1%
sparc65% | 0% | 33% | 0% | 1%
devicetree0% | 2% | 12% | 25% | 58%
process0% | 28% | 47% | 19% | 4%
dev-tools0% | 32% | 35% | 23% | 7%
input0% | 28% | 45% | 17% | 8%
core-api0% | 21% | 49% | 21% | 8%
power0% | 31% | 29% | 31% | 6%
bpf0% | 31% | 27% | 28% | 11%
ia640% | 50% | 13% | 25% | 10%
block0% | 33% | 34% | 13% | 19%
cdrom0% | 62% | 30% | 0% | 7%
powerpc0% | 15% | 56% | 13% | 13%
scheduler0% | 26% | 32% | 28% | 11%
s3900% | 25% | 57% | 6% | 11%
m68k0% | 79% | 0% | 18% | 1%
usb0% | 15% | 54% | 13% | 16%
watchdog0% | 39% | 19% | 24% | 16%
firmware-guide0% | 17% | 20% | 37% | 24%
gpu0% | 10% | 46% | 26% | 16%
hwmon0% | 0% | 26% | 20% | 52%
vm0% | 0% | 58% | 20% | 20%
arm640% | 0% | 63% | 28% | 7%
locking0% | 0% | 57% | 36% | 6%
arm0% | 0% | 31% | 32% | 36%
PCI0% | 0% | 56% | 40% | 3%
crypto0% | 0% | 64% | 23% | 12%
i2c0% | 0% | 36% | 25% | 37%
fb0% | 0% | 36% | 39% | 24%
staging0% | 0% | 65% | 27% | 7%
doc-guide0% | 0% | 86% | 0% | 13%
livepatch0% | 0% | 62% | 21% | 16%
sphinx0% | 0% | 45% | 45% | 8%
hid0% | 0% | 42% | 56% | <1%
spi0% | 0% | 50% | 32% | 17%
netlabel0% | 0% | 76% | 0% | 23%
fpga0% | 0% | 97% | 0% | 2%
fault-injection0% | 0% | 54% | 24% | 20%
timers0% | 0% | 29% | 55% | 14%
isdn0% | 0% | 77% | 0% | 22%
sh0% | 0% | 73% | 0% | 26%
cpu-freq0% | 0% | 49% | 0% | 50%
leds0% | 0% | 0% | 52% | 47%
misc-devices0% | 0% | 0% | 46% | 53%
accounting0% | 0% | 0% | 76% | 23%
maintainer0% | 0% | 0% | 64% | 35%
w10% | 0% | 0% | 32% | 67%
infiniband0% | 0% | 0% | 46% | 53%
riscv0% | 0% | 0% | 56% | 43%
ide0% | 0% | 0% | 67% | 32%
xtensa0% | 0% | 0% | 70% | 29%
mhi0% | 0% | 0% | 75% | 25%
pcmcia0% | 0% | 0% | 44% | 55%
tools0% | 0% | 0% | 24% | 75%
parisc0% | 0% | 0% | 71% | 28%
features0% | 0% | 0% | 0% | 100%
tty0% | 0% | 0% | 0% | 100%
iio0% | 0% | 0% | 0% | 100%
openrisc0% | 0% | 0% | 0% | 100%
sphinx-static0% | 0% | 0% | 0% | 100%
mips0% | 0% | 0% | 0% | 100%
arc0% | 0% | 0% | 0% | 100%
nvdimm0% | 0% | 0% | 0% | 100%
nios20% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
subdev-formats.rst
in userspace-api/media/v4l
7630 -
api.rst
in virt/kvm
5807 -
txt
kernel-parameters.txt
in admin-guide
5389 -
writing-an-alsa-driver.rst
in sound/kernel-api
3259 -
ftrace.rst
in trace
2877 -
txt
RTFP.txt
in RCU
2608 -
ext-ctrls-codec.rst
in userspace-api/media/v4l
2582 -
txt
devices.txt
in admin-guide
2573 -
arcnet-hardware.rst
in networking
2568 -
2506 -
cx2341x-devel.rst
in driver-api/media/drivers
2492 -
Requirements.rst
in RCU/Design/Requirements
2394 -
2278 -
bonding.rst
in networking
2231 -
txt
memory-barriers.txt
in translations/ko_KR
2213 -
cgroup-v2.rst
in admin-guide
2151 -
ip-sysctl.rst
in networking
2132 -
2111 -
proc.rst
in filesystems
1854 -
1774 -
ext-ctrls-codec-stateless.rst
in userspace-api/media/v4l
1684 -
1683 -
reporting-issues.rst
in admin-guide
1417 -
ethtool-netlink.rst
in networking
1332 -
txt
spkguide.txt
in admin-guide
1324 -
snmp_counter.rst
in networking
1307 -
core.rst
in security/keys
1270 -
bttv.rst
in admin-guide/media
1267 -
thinkpad-acpi.rst
in admin-guide/laptops
1239 -
1224 -
locking.rst
in translations/it_IT/kernel-hacking
1213 -
makefiles.rst
in kbuild
1183 -
locking.rst
in kernel-hacking
1166 -
pin-control.rst
in driver-api
1164 -
vfs.rst
in filesystems
1160 -
path-lookup.rst
in filesystems
1159 -
1140 -
txt
dax-hv-api.txt
in sparc/oradax
1139 -
boot.rst
in x86
1125 -
can.rst
in networking
1091 -
coda.rst
in filesystems
1089 -
kernel.rst
in admin-guide/sysctl
1081 -
fscrypt.rst
in filesystems
1081 -
1035 -
986 -
reporting-issues.rst
in translations/zh_TW/admin-guide
985 -
reporting-issues.rst
in translations/zh_CN/admin-guide
984 -
hist-v4l2.rst
in userspace-api/media/v4l
979 -
Data-Structures.rst
in RCU/Design/Data-Structures
974 -
asc
ccs-regs.asc
in driver-api/media/drivers/ccs
968 -
Files With Most Units (Top 15)
File# lines# units
kfigure.py
in sphinx
288 18
223 13
trace-pagealloc-postprocess.pl
in trace/postprocess
320 10
trace-vmscan-postprocess.pl
in trace/postprocess
632 10
cdomain.py
in sphinx
134 10
automarkup.py
in sphinx
176 7
sched-pelt.c
in scheduler
69 5
89 5
kernel_abi.py
in sphinx
104 5
94 4
124 3
108 3
kernellog.py
in sphinx
9 3
kerneldoc.py
in sphinx
105 3
36 1
Files With Long Lines (Top 50)

There are 179 files with lines longer than 120 characters. In total, there are 828 long lines.

File# lines# units# long lines
2506 - 113
421 - 78
blockmap.rst
in filesystems/ext4
48 - 47
txt
cp110-system-controller.txt
in devicetree/bindings/arm/marvell
198 - 31
xilinx_sdfec.rst
in misc-devices
199 - 25
mlx5.rst
in networking/device_drivers/ethernet/mellanox
537 - 24
lockstat.rst
in locking
168 - 22
trace-vmscan-postprocess.pl
in trace/postprocess
632 10 21
mm.rst
in x86/x86_64
136 - 19
1774 - 15
ftrace.rst
in trace
2877 - 15
biblio.rst
in userspace-api/media/v4l
220 - 15
128 - 13
proc.rst
in filesystems
1854 - 13
53 - 12
spectre.rst
in admin-guide/hw-vuln
535 - 11
dm-ima.rst
in admin-guide/device-mapper
578 - 10
52 - 9
maya44.rst
in sound/cards
121 - 9
amd-pstate.rst
in admin-guide/pm
301 - 8
netdev-FAQ.rst
in networking
205 - 8
octeontx2.rst
in networking/device_drivers/ethernet/marvell
226 - 8
subdev-formats.rst
in userspace-api/media/v4l
7630 - 8
drgn.rst
in bpf
175 - 8
w1_ds2423.rst
in w1/slaves
39 - 8
txt
RTFP.txt
in RCU
2608 - 7
158 - 7
414 - 6
ioctl-number.rst
in userspace-api/ioctl
360 - 6
46 - 5
hugetlb.rst
in admin-guide/cgroup-v1
107 - 5
locking.rst
in kernel-hacking
1166 - 4
trace-pagealloc-postprocess.pl
in trace/postprocess
320 10 4
bcache.rst
in admin-guide
457 - 4
pci-cardlist.rst
in admin-guide/media
92 - 4
snmp_counter.rst
in networking
1307 - 4
226 - 4
1035 - 4
checkpatch.rst
in dev-tools
845 - 4
locking.rst
in translations/it_IT/kernel-hacking
1213 - 4
24 - 3
24 - 3
205 - 3
binfmt-misc.rst
in admin-guide
119 - 3
qlge.rst
in networking/device_drivers/qlogic
100 - 3
878 - 3
Requirements.rst
in RCU/Design/Requirements
2394 - 3
pixfmt-srggb16.rst
in userspace-api/media/v4l
60 - 3
v4l2.rst
in userspace-api/media/v4l
228 - 3
pixfmt-srggb14.rst
in userspace-api/media/v4l
63 - 3