Linux shell: Watch progress of "cp" operation

raw

commands.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ ps auxf|grep cp
root       48756  6.4  0.0   9692  2080 pts/3    D+   09:15   6:20 cp /dev/zero /dev/sdf2
 
 
$ cat /proc/48756/io
rchar: 217524610704
wchar: 217524469760
syscr: 1659604
syscw: 1659580
read_bytes: 131072
write_bytes: 217524580352
 
 
$ watch -n2 "cat /proc/48756/io|grep wchar|cut -d ' ' -f 2 | numfmt --to=iec-i"
Alle 2,0s: cat /proc/48756/io|grep wchar|cut -d ' ' -f 2 | numfmt --to=iec-i     sybo: Tue Aug 30 10:52:46 2022
 
204Gi
 
Christian Weiske Christian Weiske
owner

History