cp verbose alternative

3

I want to list all of the files that are being copied by a cp command but the -v switch doesn't seem to exist on the servers here at work. I'm not sure exactly which OS this is. I think it might be SunOS. How could I find out if that is important?

Thanks

A Jackson

Posted 2009-08-25T05:56:34.930

Reputation: 807

1uname -a might tell you what the OS is. – Paused until further notice. – 2009-08-25T13:09:50.893

Answers

4

You could use tar piped to tar instead, which may be more featureful, as you can harness the power of tar in addition to being a cross-platform verbosity solution.

tar -cvpf . - | (cd destination/directory && tar -xvpf -)

jtimberman

Posted 2009-08-25T05:56:34.930

Reputation: 20 109

Thanks! Worked for me too, but had to swap the order of the arguments for tar: tar -cvpf - . | (cd destination/directory && tar -xvpf -) – Eric B. – 2015-02-03T16:11:20.000

Thanks. That worked great. Helped me find why the files weren't appearing. I was running it from a shell script and the variables were set wrong. Hopefully I haven't left files all over the server from the times I got it wrong... – A Jackson – 2009-08-25T07:01:20.540

0

You could also try ditto (if it's present on your machine). ditto -V will print out each filename as it's copied.

s4y

Posted 2009-08-25T05:56:34.930

Reputation: 3 469

0

One more option is rsync -v.

Nelson

Posted 2009-08-25T05:56:34.930

Reputation: 2 189

0

cat /etc/issue

to get the distro name


unison is lovely too if you can get it installed on the server

http://www.cis.upenn.edu/~bcpierce/unison/

Tim Abell

Posted 2009-08-25T05:56:34.930

Reputation: 349