Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

man page for cp wrong?

I just noticed that the man page for cp doesn't match the usage. If you enter cp --help, it gives:
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-pv] src target

but the man page gives many more options, including the ones I want to use: -l (link files) and -a (archive), and they don't work with /bin/cp.

Is there are source for the cp described in the info and man pages? (It comes with Ubuntu, for example)

Boyd

Power Mac G5 1.6 GHz, Mac OS X (10.3.9), Ubuntu Linux on PC clone

Posted on May 16, 2006 11:44 AM

Reply
10 replies

May 16, 2006 12:22 PM in response to Boyd

Hi Boyd,
I think that you've installed some other version cp, maybe through Fink's coreutils package. My man page looks exactly like your usage text. You should be able to read the correct man page with the command:

man -M /usr/share/man cp

I've actually made the first part of that command an alias that I call "manmac".

You can find the source code for cp at opendarwin in file_cmds-116.9/cp.
--
Gary
~~~~
It is the theory which decides what can be observed.
-- Albert Einstein

May 16, 2006 1:12 PM in response to Jeff Hubbach

Gary, Jeff. You are both correct more or less. It looks like the /sw/share/man/man1/cp.1 is the man page being displayed (makes sense, since the /sw/share/man is first in my MANPATH list), but the cp on my system is only in /bin/cp, not /sw/bin/cp. Strange that I would have the man page, but not the binary file.

I don't see fink coreutils. I have fileutils installed. I'll check osxutils, and some of the other *utils.

Thanks for the help.

Boyd

May 16, 2006 1:26 PM in response to Boyd

Hi Boyd,
You don't have to check for coreutils, cp is in fileutils. Coreutils is a newer "megapackage" that contains fileutils, shellutils and others.

The only reason I specified coreutils is that Fink just recently got coreutils to compile and now it's a dependency of several of packages that didn't previously require it. I was just guessing that that new dependency was how it got on your system without your knowing about it.
--
Gary
~~~~
Wherever you go...There you are.
- Buckaroo Banzai

May 16, 2006 6:29 PM in response to Gary Kerbaugh

So, Gary, it sounds like my fink fileutils is not complete - I'll try updating it later. Right now I'm using pax to make a snapshot of my current backup. Thanks.
Boyd
-----
Off topic:

Maybe I'll post my backup procedures later - I have been invited to write an article for SysAdmin of the method I'm using at work with rsync, cp -al, removable hard disks ( for off-site storage ), and re-sync.pl to rotate an off-site disk back into the cycle without having to rebuild the whole thing.

Another feature: it keeps on-line multiple versions of all the files, but does so w/o the backup disk growing very fast.

All of this sounds like some of the b/u packages out there, but I wanted something I could understand from the ground up, and as far as I know, the method I came up with will re-sync a removable drive that has not been in the loop for a while, and rebuild it so that it becomes like a mirror of the other removable drive, but does so w/o having to rebuild the whole disk. (I tried the whole-disk method, and it took 19 hours to rebuild the whole disk of about 100 Gbytes - I'm hoping the re-sync method will be considerably faster)

May 16, 2006 7:34 PM in response to Boyd

Hi Boyd,
That sounds like a pretty interesting backup scheme. Of course the part that I like best is that you did it from the ground up. I did the same with a tar backup. I would very much like read your article. I hope that when it's published, you'll post the link here! What is SysAdmin? Is that a magazine or a website?
--
Gary
~~~~
"Nominal fee". What an ugly sentence. It's one of
those things that implies that if you have to ask,
you can't afford it.
-- Linus Torvalds

May 17, 2006 7:49 PM in response to Gary Kerbaugh

Thanks, Gary, for the kind words.

SysAdmin is mostly a printed,monthly, magazine, but also has a nice web site & CD-ROM's with all the articles archived. I have gotten much help from it over the years. The site is:

http://www.samag.com/

Thanks for the interest in the procedure - I'll post a description here when I get it written and/or e-mail you a copy.

Boyd

May 18, 2006 8:37 PM in response to Boyd

Hi Boyd,
Thank you very much for that link. When a sys admin says that a sys admin site is good, that's really saying something! I look forward to studying it.

If you execute "fink install <package>" when the package is already installed and up-to-date, Fink won't do anything. For what you want to do, the "fink reinstall <package>" command would have done what you want. However, there are always many ways to do something and as long as you get what you need, the method probably isn't important.
--
Gary
~~~~
Real Men don't make backups. They upload it
via ftp and let the world mirror it.
-- Linus Torvalds

man page for cp wrong?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.