Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on Copy files while showing progress

Parent

Copy files while showing progress

+5
−0

The standard cp tool from GNU coreutils just copies files silently. This can be a little unnerving when copying large chunks of data. You're left to wonder whether it's actually doing something or just got stuck.

How to copy files and directories in terminal while displaying some kind of progress information?

History

2 comment threads

"The standard cp tool from GNU coreutils just copies files silently." Well, they are designed to d... (2 comments)
You could use rsync instead of cp. Or try https://linux.die.net/man/1/progress (3 comments)
Post
+4
−0

If you don't mind installing an additional tool, progress will do exactly what you want.

progress aims to detect any running command performing significant file I/O. Commonly supported commands include: cp, mv, dd, tar, gzip, gunzip, cat (when copying), rsync (local operations), dpkg, rpm, and various archivers like zip, unzip, xz, bzip2, bunzip2. Its effectiveness depends on how the command performs its I/O and if it keeps file descriptors open predictably.

Example:

$ cp filename /target/ | progress -m
[286427] cp filename
        13.2% (753.5 MiB / 5.6 GiB) 166.1 MiB/s remaining 0:00:29

Note: This will only show the individual progress per file copied, no overall progress if multiple files are copied.

History

1 comment thread

Relation to Pipe Viewer (1 comment)
Relation to Pipe Viewer
Iizuki‭ wrote 11 months ago

At first I thought this was a Pipe Viewer clone but it's actually way more ad hoc :D Just looking for processes you probably wanted to monitor.

Looks convenient though ^^