FINCORE(1)

๐Ÿ’– fincore(1) โ€” the "how much of my file is literally living in RAM rn" girlie ๐Ÿ’–

User Commands ยท part of the util-linux squad


โœจ NAME โœจ

fincore โ€” count pages of file contents in core, bestie ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

fincore [options] file...

๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so. fincore counts pages of file contents being resident in memory (in core), and reports the numbers. that's the whole vibe. ๐Ÿซถ

if an error happens while it's counting, it prints an error message to stderr and then โ€” queen behaviour โ€” fincore just keeps processing the rest of the files listed on the command line. no drama, no quitting. ๐Ÿ˜Œ

fincore uses the cachestat(2) syscall to count resident pages. if the cachestat(2) syscall is not available and cachestat usage is not forced with the --cachestat option, then fincore falls back to the mincore(2) syscall. it's giving backup plan energy. ๐Ÿ’โ€โ™€๏ธ

cachestat(2) is more efficient than mincore because it does not require a page table lock to walk page tables, and it also reports more info than mincore, like:

  • the number of cached pages
  • dirty pages
  • pages marked for writeback
  • evicted pages
  • recently evicted pages

so likeโ€ฆ more tea, less effort. iconic. โœจ

another difference between the two syscalls: if write permissions are not granted to the file, then cachestat(2) returns an error, while mincore(2) โ€” for security reasons โ€” returns fake data as if all pages were resident in memory (c.f.r. kernel commit "make mincore() more conservative" <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=134fca9063ad4851de767d1768180e5dede9a881>). yeah. it lies to you. for your own good. ๐Ÿ’€

โš ๏ธ the default output is subject to change. so whenever possible, you should avoid using default outputs in your scripts. always explicitly define expected columns by using --output columns-list in environments where a stable output is required. fr fr, do not trust the default column lineup with your automation. ๐Ÿšจ

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -n, --noheadings โ€” do not print a header line in status output. no header, just data, we're mysterious. ๐Ÿ™ˆ
  • -b, --bytes โ€” print sizes in bytes rather than in human-readable form.

by default, sizes are shown in units that are powers of 1024 bytes. the formal abbreviations for these units (KiB, MiB, GiB, ...) are further shortened to just their first letter: K, M, G, .... so cute, so compact. ๐ŸŽ€

  • -c, --total โ€” produce a grand total. the sum of all the things. the final boss. ๐Ÿ”ฅ
  • -C, --cachestat โ€” force usage of the cachestat(2) syscall instead of mincore(2), and fail if it's not available. no fallback, no plan B, we die like legends. ๐Ÿ’…
  • -o, --output list โ€” define output columns. see the --help output to get a list of the currently supported columns. the default list of columns may be extended if list is specified in the format +list. yes, plus sign, it's additive, slay. โž•
  • --output-all โ€” output all available columns. every single one. maximalist queen. ๐Ÿ‘‘
  • -r, --raw โ€” produce output in raw format. all potentially unsafe characters are hex-escaped (\x<code>). safety girlie. ๐Ÿงš
  • -J, --json โ€” use JSON output format. for when your script wants structure. ๐Ÿ“
  • -R, --recursive โ€” recursively check all files in directories. go deep, bestie. ๐Ÿฆ‹
  • -h, --help โ€” display help text and exit. we love a self-aware command. ๐Ÿ’–
  • -V, --version โ€” display version and exit. โœจ

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

  • LIBSMARTCOLS_DEBUG=all โ€” enables libsmartcols debug output. ๐Ÿ”
  • LIBSMARTCOLS_DEBUG_PADDING=on โ€” use visible padding characters. so you can literally see the spacing. lowkey mesmerizing. ๐Ÿซง
  • LIBSMARTCOLS_JSON=compact|lines โ€” controls JSON output format when using --json. supported values are compact for JSON output with minimal whitespace, and lines for JSON Lines format (one JSON object per line). if unset or set to any other value, pretty-printed JSON is used. ๐ŸŽ€

๐Ÿ’œ AUTHORS ๐Ÿ’œ

Masatake YAMATO <yamato@redhat.com> โ€” thank you for your service, king ๐Ÿซก


โญ SEE ALSO โญ

mincore(2), getpagesize(2), getconf(1p) cachestat(2)


๐Ÿ˜ญ REPORTING BUGS ๐Ÿ˜ญ

for bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>.

(be nice, they're trying their best, and also they're reading your bug report so like. give them the details. ๐Ÿ™)


๐ŸŽ€ AVAILABILITY ๐ŸŽ€

the fincore command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.


okay that's the whole page bestie, go count some resident pages, you absolute icon ๐Ÿ’…โœจ

this was util-linux 2.42.4, dated 2026-09-21 โ€” FINCORE(1), out. ๐Ÿซถ bye!!

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms