From 4de60d28ca1a034d9713ed0fc84ae6f93b0ffcc4 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Wed, 25 Jan 2023 13:29:29 +0100 Subject: Initial import --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..c164345 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# dontneed: tell linux you don't need some files in RAM cache + +Maybe used to prevent swapping about files you write but don't read, like somedump.sql.gz on somelog.1.gz. + + Usage: ./dontneed ... + Calls posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) on each + + Tip: you may find all cached files from rootfs with the costly one-liner: + # find / -mount -type f -print0 | xargs -r0 fincore | grep -vE '^ *0B' | sort -hr | uniq | less -- cgit v1.2.3