eatmydata(1)
β¨ NAME β¨
okay bestie, eatmydata(1) from the General Commands Manual is literally the tool for making your programs stop waiting on the disk π
. Its whole job is to transparently disable fsync() and other data-to-disk synchronization calls π«Ά.
π SYNOPSIS π
eatmydata [--] command [ command arguments ... ]
π DESCRIPTION π
okay so eatmydata runs a command in a world where data-to-disk synchronization calls (like fsync(), fdatasync(), sync(), msync() and the open() O_SYNC / O_DSYNC flags) have no effect π. The secret sauce is the LD_PRELOAD library libeatmydata, which overrides those C library calls with its own functions. They don't trigger any synchronization, but they still report success anyway π
β¨.
You can use eatmydata in two ways, and both are giving different vibes π¦:
- Normal mode β just run
eatmydatadirectly and hand it the command you want to run, plus its arguments, on the command line. - Symlink mode β make a symlink to
/usr/bin/eatmydatathat is named after another program (its filename, a.k.a. basename) that lives somewhere in yourPATH, then runeatmydatathrough that symlink.eatmydatawill find that program in thePATHand run it inside the libeatmydata environment, passing along all of your command line options πΈ.
π OPTIONS π
Heads up, eatmydata does not process any command line options in symlink mode π. Every option gets passed straight through to the underlying executable, exactly as-is.
commandβ the command you want to run π. It can be a full path or just the name of a command inPATH. If the command can't be found inPATH,eatmydatawill fail.command argumentsβ any number of arguments you want to hand to the command being run π§.--β an optional command separator, included so it feels familiar to similar utilities π. It's ignored at the moment.
π EXAMPLES π
Say PATH is /usr/bin and both /usr/bin/aptitude and /usr/bin/eatmydata are installed. Then this:
$ ln -s /usr/bin/eatmydata ./aptitude
$ ./aptitude moo
is the same as this:
$ eatmydata -- aptitude moo
So yes, you can use symlink mode to automatically run specific programs in the libeatmydata environment whenever you launch them from PATH π₯. For example, with standard PATH settings, you just do:
# ln -s /usr/bin/eatmydata /usr/local/bin/aptitude
and boom, sync-free aptitude system-wide π«Άπ
.
π CAVEAT π
Watch out, bestie! When you useeatmydatawithsetarch(including aliases such aslinux32), or with chroots that have a different architecture than the host's, make sure you install the matching architecture oflibeatmydata1in both thesetarchenvironment and on the host π.
Trying to load libeatmydata manually (without the wrapper script) and then using it through a chroot is probably going to fail π, especially if the eatmydata versions differ between outside and inside, due to the library being in a different spot on the file system π₯Ί. The safest way to load libeatmydata manually is to set these two environment variables (shell syntax):
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata
LD_PRELOAD=${LD_PRELOAD:+"$LD_PRELOAD "}libeatmydata.so
These two variables account for the case of a Debian Jessie host with a Debian Wheezy chroot, where the library's location changed β¨.
Manual page eatmydata(1), November 2014. Stay synced with your besties πΈπ
π¦ where this page comes from
- debian bookworm: eatmydata 130-2 Β· GPL-3.0-or-later
- debian trixie: eatmydata 131-2 Β· GPL-3.0-or-later
- epel 10: eatmydata 131-1.el10_1 Β· GPL-3.0-only
- epel 9: eatmydata 131-1.el9 Β· GPL-3.0-only
- fedora 43: eatmydata 131-2.fc43 Β· GPL-3.0-only
- fedora 44: eatmydata 131-3.fc44 Β· GPL-3.0-only
- ubuntu jammy: eatmydata 130-2build1 Β· GPL-3.0-or-later
- ubuntu noble: eatmydata 131-1ubuntu1 Β· GPL-3.0-or-later
- ubuntu questing: eatmydata 131-2 Β· GPL-3.0-or-later
- ubuntu resolute: eatmydata 131-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: eatmydata 131-2build1 Β· GPL-3.0-or-later
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms