diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2023-01-25 13:29:29 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2023-01-25 13:29:29 +0100 |
commit | 4de60d28ca1a034d9713ed0fc84ae6f93b0ffcc4 (patch) | |
tree | 1ec78a3d5373632c291448d5e294e0816a6bb1e5 /README.md | |
download | dontneed-master.tar.gz dontneed-master.tar.bz2 dontneed-master.zip |
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
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 <path>... + Calls posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED) on each <path> + + 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 |