Skip to content

Hook `open` and `open64` libc calls to avoid updating atimes while searching or the like.

License

Notifications You must be signed in to change notification settings

lilydjwg/open-noatime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hook open and open64 libc calls to avoid updating atimes while searching or the like.

Why

atimes are useful for a lot of reasons so you may not want to disable them completely. However with advanced searching tools like ripgrep you'll tend to search a lot more files than actually needed, thus updating atimes of a lot of files. You'll lose track of last actual use of the files as well as being slow because of disk writes.

Works with

This is known to work with ripgrep on Linux with glibc.

Installation

cargo build --release
sudo install -Dsm755 target/release/libopen-noatime.so /usr/local/lib/
sudo ldconfig

Usage

LD_PRELOAD=libopen_noatime.so rg ...

You'll want to create a wrapper, a shell function, or an alias for it.

About

Hook `open` and `open64` libc calls to avoid updating atimes while searching or the like.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages