1E2CP(1) User commands E2CP(1)
2
3
4
6 e2cp - copies files from/to an e2fs filesystem
7
9 e2cp [options] files... dest
10
12 The e2cp command copies files to/from an e2fs filesystem from/to the
13 machine's filesystem.
14
16 A single `-' (dash) can be used instead of a file name to indicate
17 standard input/output.
18
19 -0 Input lines terminated by a null character.
20
21 -a Absolute directory names - create directories instead of just
22 copying into the destination. Only valid for copying into an
23 ext2fs filesystem.
24
25 -d dest_dir
26 Destination of files to be copied. May be in the ext2fs filesys‐
27 tem or the host filesystem.
28
29 -G gid Set the default group to gid.
30
31 -O uid Set the default file owner to uid.
32
33 -p Preserve host file attributes (permissions, times, etc.) when
34 copying files.
35
36 -P mode
37 Set the file permissions (ie 755, 666).
38
39 -s src_dir
40 The source of the files to be copied.
41
42 -v Be verbose.
43
45 Copy a file and use the default permission and ownership of the current
46 user:
47
48 e2cp README.txt /tmp/boot.img:/tmp
49
50 Do the same thing, but keep permissions & ownership:
51
52 e2cp -p README.txt /tmp/boot.img:/tmp
53
54 Dump a file to standard out:
55
56 e2cp /tmp/boot.img:/tmp/README.txt - | wc
57
58 Get a file from standard input and put it on an unmounted partition:
59
60 tar cf - /data/logs|gzip| e2cp - /dev/hdb1:/backup/logs.tar.gz
61
62 Copy the files from one directory and put them under another directory
63 on an unmounted partition, keeping the original paths, permissions &
64 ownership:
65
66 find /data -type f |tee filelist | e2cp -apv -d /dev/hdb1:/mirror
67
68 Copy files from a directory on an unmounted partition to a local direc‐
69 tory (Note: this does not recreate the directories in the local
70 filesystem, yet). The list of files are read from standard input:
71
72 e2cp -pv -s /dev/hdb1:/mirror -d /data2 < filelist
73
74 Copy a file to a file system and make the group and ownership root
75
76 e2cp -G 0 -O 0 myfile /tmp/boot.img/boot/rootfile
77
79 e2tools(7), e2ln(1), e2ls(1), e2mkdir(1), e2mv(1), e2rm(1), e2tail(1).
80
82 The e2tools were written by Keith Sheffield <sheff@pobox.com>.
83
84 This manual page was written by Lucas Wall <lwall@debian.org>, for the
85 Debian project (but may be used by others).
86
87
88
89Linux 2020-02-05 E2CP(1)