vote up 2 vote down star

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

flag

75% accept rate
uname -a might tell you what the OS is. – Dennis Williamson Aug 25 at 13:09

4 Answers

vote up 2 vote down check

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 -)
link|flag
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... – Android Aug 25 at 7:01
vote up 0 vote down

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

link|flag
vote up 0 vote down

One more option is rsync -v.

link|flag
vote up 0 vote down

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/

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.