how to copy a directory (local) from terminal with progress bar showing
Hello everyone,
I am new both here and in Linux. As the subject says, I would like to learn how to copy a directory (not a file) from terminal with progress bar showing. The copy is local, i.e., not to another computer. My distro is CentOS 5.5. I know that if I do it with nautilus I would see the progress, but I want to learn how to do it from the terminal. I know that PV command can show a progress bar, but from what I saw, it works well for files, but not for directories (recursive). Is it possible to use PV for directories? If yes, could you please show me the syntax? I also saw that some people mentioned that rsync can also show a progress bar, I tried to do it, but it didn't work out - perhaps I got the syntax wrong. If rsync can really be used to copy directories with progress bar, could you please show me the syntax? Any other ideas on how to do it? I would like ideas that do not involve using any script, i.e., just something that I can do using the regular commands. Many thanks in advance. Linux.Girl |
|
Thanks sem007. I saw this thread before, but it didn't help me.
As I mentioned in my question, I do not want to use a script, I want to use the regular commands available. The thread also mentions PV and rsync, but without much detail. I am very very new and I need someone to show me the exact syntax to copy a directory (localy) using PV. I still don't understand well enough what rsync does and how does it work, hence the PV preference. Still, thanks for trying to help. Linux.Girl |
Just as a trick, you can use scp with @localhost:
Code:
scp -r <source> user@localhost:<target> Code:
rsync -rvh --progress... |
Thanks quanta - wow!
Another quick question, if you don't mind: Can you please explain to me what the "user@localhost" means in the scp example that you gave? i.e., why the syntax is scp -r <source> user@localhost:<target> as opposed to scp -r <source> <target> Sorry, I'm a newbie! Thanks a lot! Linux.Girl |
Quote:
|
ahhh, ok, no, I don't need to copy it to a remote host, just locally in my computer. So I guess rsync would be the best option (to copy directory locally with progress bar)?
Thanks agains! |
All times are GMT -5. The time now is 12:38 AM. |