E2CP(1)
π E2CP(1) β the tea
okay so bestie, welcome to e2cp, a lil User commands girlie from the e2tools family. She copies files back and forth between your machine's filesystem and an e2fs filesystem, and honestly? she ate. π
β¨ NAME β¨
e2cp β copies files from/to an e2fs filesystem. that's it, that's the whole job. π
πΈ SYNOPSIS πΈ
e2cp [options] files... dest
π¦ DESCRIPTION π¦
The e2cp command copies files to/from an e2fs filesystem from/to the machine's filesystem. yes queen, both directions. bidirectional icon behavior. π₯
π OPTIONS π
A single - (dash) can be used instead of a file name to indicate standard input/output. like, the dash IS the file. main character energy fr. π«Ά
-0β Input lines terminated by a null character.-aβ Absolute directory names β create directories instead of just copying into the destination. Only valid for copying into an ext2fs filesystem. so don't try it the other way, bestie, it's not gonna slay.-ddest_dir β Destination of files to be copied. May be in the ext2fs filesystem or the host filesystem. either one, she doesn't judge. π-Ggid β Set the default group to gid.-Ouid β Set the default file owner to uid.-pβ Preserve host file attributes (permissions, times, etc.) when copying files. glow-up protection. β¨-Pmode β Set the file permissions (ie755,666).-ssrc_dir β The source of the files to be copied.-vβ Be verbose. she will yap. π£οΈ
π EXAMPLES π
Copy a file and use the default permission and ownership of the current user:
e2cp README.txt /tmp/boot.img:/tmp
Do the same thing, but keep permissions & ownership:
e2cp -p README.txt /tmp/boot.img:/tmp
Dump a file to standard out:
e2cp /tmp/boot.img:/tmp/README.txt - | wc
Get a file from standard input and put it on an unmounted partition:
tar cf - /data/logs|gzip| e2cp - /dev/hdb1:/backup/logs.tar.gz
Copy the files from one directory and put them under another directory on an unmounted partition, keeping the original paths, permissions & ownership:
find /data -type f |tee filelist | e2cp -apv -d /dev/hdb1:/mirror
Copy files from a directory on an unmounted partition to a local directory (Note: this does not recreate the directories in the local filesystem, yet). The list of files are read from standard input:
e2cp -pv -s /dev/hdb1:/mirror -d /data2 < filelist
Copy a file to a file system and make the group and ownership root
e2cp -G 0 -O 0 myfile /tmp/boot.img/boot/rootfile
ok real talk, that note in example 6 is important β the directories are NOT recreated in the local filesystem. it says "yet", so like, manifesting future features ig. π
π SEE ALSO π
e2tools(7), e2ln(1), e2ls(1), e2mkdir(1), e2mv(1), e2rm(1), e2tail(1).
go read those too, the whole family is iconic. π
π AUTHOR π
The e2tools were written by Keith Sheffield <sheff@pobox.com>.
This manual page was written by Lucas Wall <lwall@debian.org>, for the Debian project (but may be used by others). shoutout to them fr fr, they did the work so we could vibe. π«Ά
and that's the whole page bestie!! this was Linux, dated 2020-02-05, from the e2tools source β ily, go copy some files, periodt π β¨
π¦ where this page comes from
- alpine 3.24: e2tools-doc 0.1.2-r1 Β· GPL-2.0-only
- debian bookworm: e2tools 0.1.0-3 Β· GPL-2.0-or-later
- debian trixie: e2tools 0.1.2-1 Β· GPL-2.0-or-later
- fedora 43: e2tools 0.1.0-14.fc43 Β· GPL-1.0-or-later
- fedora 44: e2tools 0.1.0-15.fc44 Β· GPL-1.0-or-later
- nixos 26.05: e2tools 0.1.2
- nixpkgs unstable: e2tools 0.1.2
- ubuntu jammy: e2tools 0.1.0-2 Β· GPL-2.0-or-later
- ubuntu noble: e2tools 0.1.0-3build2 Β· GPL-2.0-or-later
- ubuntu questing: e2tools 0.1.2-1
- ubuntu resolute: e2tools 0.1.2-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: e2tools 0.1.2-1build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms