ecryptfs-rewrite-file(1)

πŸ“¦
version 111 Β· 2 versions
  • 111 Β· alpine 3.24, arch rolling, debian bookworm, debian trixie, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 111 Β· fedora 43, fedora 44
, in alpine 3.24, arch rolling, debian bookworm, debian trixie, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ecryptfs-rewrite-file πŸ’–

okay bestie, welcome to the ecryptfs-rewrite-file(1) page, part of the eCryptfs crew. this one's a little script with a big job: it makes a file get rewritten, which means reencrypted, down in the lower filesystem. no cap. πŸ”₯


✨ NAME ✨

ecryptfs-rewrite-file β€” force a file to be rewritten (reencrypted) in the lower filesystem πŸ’…


🌸 SYNOPSIS 🌸

ecryptfs-rewrite-file [file1] [file2] [file3] ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea πŸ“ β€” this script takes one or more files, directories, or symlinks as its arguments, moves every single one of them to a temporary file, and then moves them right back to the original name. and that little round trip is what causes the file to be rewritten (and reencrypted) in the lower filesystem. it's giving glow-up, but for bytes. ✨

you can also pair this script with find(1) and xargs(1) to rewrite a whole entire eCryptfs mountpoint, unmount it, and sync. the iconic trio:

find . -xdev -print0 | xargs -r -0 /usr/bin/ecryptfs-rewrite-file
ecryptfs-umount-private
sync
fr fr, bestie: it is advised that this script gets executed in runlevel 1 or 3, so you can avoid simultaneous writes and race conditions with the files you're targeting. πŸ‘‘
⚠️ BIG WARNING, NO CAP ⚠️ USING THIS SCRIPT WHILE GNOME, KDE, OR OTHER APPLICATIONS ARE RUNNING MAY CAUSE DATA LOSS. πŸ˜­πŸ’€ like, actual data loss. close your apps, be safe, protect your files.

πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ AUTHOR πŸ‘‘

this manpage was written by Dustin Kirkland <kirkland@ubuntu.com> for Ubuntu systems (but it may be used by others, she's generous like that 🫢). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. periodt. πŸ’…

on Debian and Ubuntu systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. πŸ“„


ecryptfs-utils Β· 2009-03-20 Β· ecryptfs-rewrite-file(1)

and that's the whole page, bestie πŸ₯° stay encrypted, stay slay, and pls pls pls don't run this with your desktop session wide open. mwah! πŸ’–βœ¨πŸ§š