bug in exercise 2 in chapter 1?
Exercise 2 in chapter 1 states that the commands:
man -k "copy file"
and
apropos "copy file"
return equivalent results. I found this not to be the case. I've tried this on two Macs, both running OS 10.4.6
I've copied the results from my terminal below. When I use the command:
apropos "copy file" I get a short response as follows:
================================================== ====================
bluewater:~ swartout$ apropos "copy file"
CpMac(1), /Developer/Tools/CpMac(1) - copy files preserving metadata and forks
File::Copy(3pm) - Copy files or filehandles
cp(1) - copy files
cpio(1) - copy file archives in and out
ditto(1) - copy files and directories to a destination directory
bluewater:~ swartout$
================================================== ===================
But when I use the command
man -k "copy file"
I get a much longer response, which I have truncated below:
================================================== ====================
bluewater:~ swartout$ man -k "copy file"
CpMac(1), /Developer/Tools/CpMac(1) - copy files preserving metadata and forks
File::Copy(3pm) - Copy files or filehandles
FileSystem(3tcl), Tcl_FSRegister(3tcl), Tcl_FSUnregister(3tcl), Tcl_FSData(3tcl), Tcl_FSMountsChanged(3tcl), Tcl_FSGetFileSystemForPath(3tcl), Tcl_FSGetPathType(3tcl), Tcl_FSCopyFile(3tcl), Tcl_FSCopyDirectory(3tcl), Tcl_FSCreateDirectory(3tcl), Tcl_FSDeleteFile(3tcl), Tcl_FSRemoveDirectory(3tcl), Tcl_FSRenameFile(3tcl), Tcl_FSListVolumes(3tcl), Tcl_FSEvalFile(3tcl), Tcl_FSLoadFile(3tcl), Tcl_FSMatchInDirectory(3tcl), Tcl_FSLink(3tcl), Tcl_FSLstat(3tcl), Tcl_FSUtime(3tcl), Tcl_FSFileAttrsGet(3tcl), Tcl_FSFileAttrsSet(3tcl), Tcl_FSFileAttrStrings(3tcl), Tcl_FSStat(3tcl), Tcl_FSAccess(3tcl), Tcl_FSOpenFileChannel(3tcl), Tcl_FSGetCwd(3tcl), Tcl_FSChdir(3tcl), Tcl_FSPathSeparator(3tcl), Tcl_FSJoinPath(3tcl), Tcl_FSSplitPath(3tcl), Tcl_FSEqualPaths(3tcl), Tcl_FSGetNormalizedPath(3tcl), Tcl_FSJoinToPath(3tcl), Tcl_FSConvertToPathType(3tcl), Tcl_FSGetInternalRep(3tcl), Tcl_FSGetTranslatedPath(3tcl), Tcl_FSGetTranslatedStringPath(3tcl), Tcl_FSNewNativePath(3tcl), Tcl_FSGetNativePath(3tcl), Tcl_FSFileSystemInfo(3tcl), Tcl_AllocStatBuf(3tcl) - procedures to interact with any filesystem
GFDL(1) - The GNU Free Documentation License Version 1.1, March 2000 Copyright t (co n (c) 2000 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed
acl_copy_entry(3) - copy an ACL entry to another ACL entry
asr(8) - Apple Software Restore; copy volumes (e.g. from disk images)
bcmp(3), bcopy(3), bzero(3), memccpy(3), memchr(3), memcmp(3), memcpy(3), memmove(3), memset(3) - byte string operations
bcopy(3) - copy byte string
copy(9), copyin(9), copyout(9), copystr(9), copyinstr(9) - kernel copy functions
copysign(3) - changes the sign of x to that of y
cp(1) - copy files
cpio(1) - copy file archives in and out
dd(1) - convert and copy a file
ditto(1) - copy files and directories to a destination directory
fcopy(ntcl) - Copy data from one channel to another
memccpy(3) - copy string until character found
memcpy(3) - copy memory area
memmove(3) - copy byte string
netsnmp_library(3), The Net-SNMP library(3) - "Modules" +1c -1c "groupasn1 parsing and datatype manipulation routines." -1c "groupA generic callback mechanism" -1c "groupgeneric linked-list data handling with a string as a key." -1c "groupstorage space for defaults" "The purpose of the default storage is three-fold:. " +1c -1c "groupmib parsing and datatype manipulation routines." -1c "groupStore and retrieve data referenced by an OID." "This is essentially a way of storing data associated with a given OID. " +1c -1c "groupparsing various configuration files at run time" "The read_config related functions are a fairly extensible system of parsing various configuration files at the run time. " +1c -1c "groupgeneric library based alarm timers for various parts of an application" -1c "groupvarious PDU processing routines" -1c "groupgeneric logging for net-snmp" -1c "groupMemory Utility Routines" -1c "Data Structures" +1c -1c "struct snmp_internal_session" -1c "struct session_list" -1c "Defines" +1c -1c "#define MIN(a, b) (((a) < (b)) ? (a) : (b))" -1c "#define MIB_CLIENTS_ARE_EVIL 1" -1c "#define _init_agent_callback_transport()" -1c "#define SNMP_NEED_REQUEST_LIST" -1c "#define timercmp(tvp, uvp, cmp)" -1c "#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0" -1c "#define MAX_PACKET_LENGTH (0x7fffffff)" -1c "#define NETSNMP_STREAM_QUEUE_LEN 5" -1c "#define BSD4_2" -1c "#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */" -1c "#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))" -1c "#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))" -1c "#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))" -1c "#define FD_ZERO(p) memset((p), 0, sizeof(*(p)))" -1c "#define DEFAULT_COMMUNITY 'public'" -1c "#define DEFAULT_RETRIES 5" -1c "#define DEFAULT_TIMEOUT 1000000L" -1c "#define DEFAULT_REMPORT SNMP_PORT" -1c "#define DEFAULT_ENTERPRISE default_enterprise" -1c "#define DEFAULT_TIME 0" -1c "#define MAXIMUM_PACKET_SIZE 0x7fffffff" -1c "#define DEBUGPRINTPDUTYPE(token, type)" -1c "#define ERROR_STAT_LENGTH 11" -1c "Typedefs" +1c -1c "typedef long fd_mask" -1c "Functions" +1c -1c "int init_agent (const char *app)" "Initialize the agent. " -1c "void shutdown_agent (void)" -1c "int snmp_build (u_char **pkt, size_t *pkt_len, size_t *offset, netsnmp_session *pss, netsnmp_pdu *pdu)" -1c "int snmp_get_errno (void)" -1c "void snmp_synch_reset (netsnmp_session *notused)" -1c "void snmp_synch_setup (netsnmp_session *notused)" -1c "const char * strerror (int err)" -1c "long snmp_get_next_reqid (void)" -1c "long snmp_get_next_msgid (void)" -1c "long snmp_get_next_sessid (void)" -1c "long snmp_get_next_transid (void)" -1c "void snmp_perror (const char *prog_string)" -1c "void snmp_set_detail (const char *detail_string)" -1c "const char * snmp_api_errstring (int snmp_errnumber)" -1c "void snmp_error (netsnmp_session *psess, int *p_errno, int *p_snmp_errno, char **p_str)" -1c "void snmp_sess_error (void *sessp, int *p_errno, int *p_snmp_errno, char **p_str)" -1c "void netsnmp_sess_log_error (int priority, const char *prog_string, netsnmp_session *ss)" -1c "void snmp_sess_perror (const char *prog_string, netsnmp_session *ss)" -1c "void snmp_sess_init (netsnmp_session *session)" -1c "void init_snmp_enums (void)" -1c "void init_snmp (const char *type)" "Calls the functions to do config file loading and mib module parsing in the correct order. " -1c "void snmp_store (const char *type)" -1c "void snmp_shutdown (const char *type)" "Shuts down the application, saving any needed persistent storage, and appropriate clean up. " -1c "netsnmp_session * snmp_open (netsnmp_session *session)" -1c "netsnmp_session * snmp_open_ex (netsnmp_session *session, int(*fpre_parse)(netsnmp_session *, netsnmp_transport *, void *, int), int(*fparse)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t), int(*fpost_parse)(netsnmp_session *, netsnmp_pdu *, int), int(*fbuild)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t *), int(*frbuild)(netsnmp_session *, netsnmp_pdu *, u_char **, size_t *, size_t *), int(*fcheck)(u_char *, size_t))" -1c "int snmpv3_engineID_probe (struct session_list *slp, netsnmp_session *in_session)" -1c "netsnmp_session * snmp_add (netsnmp_session *in_session, netsnmp_transport *transport, int(*fpre_parse)(netsnmp_session *, netsnmp_transport *, void *, int), int(*fpost_parse)(netsnmp_session *, netsnmp_pdu *, int))" -1c "netsnmp_session * snmp_add_full (netsnmp_session *in_session, netsnmp_transport *transport, int(*fpre_parse)(netsnmp_session *, netsnmp_transport *, void *, int), int(*fparse)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t), int(*fpost_parse)(netsnmp_session *, netsnmp_pdu *, int), int(*fbuild)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t *), int(*frbuild)(netsnmp_session *, netsnmp_pdu *, u_char **, size_t *, size_t *), int(*fcheck)(u_char *, size_t), netsnmp_pdu *(*fcreate_pdu)(netsnmp_transport *, void *, size_t))" -1c "void * snmp_sess_add_ex (netsnmp_session *in_session, netsnmp_transport *transport, int(*fpre_parse)(netsnmp_session *, netsnmp_transport *, void *, int), int(*fparse)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t), int(*fpost_parse)(netsnmp_session *, netsnmp_pdu *, int), int(*fbuild)(netsnmp_session *, netsnmp_pdu *, u_char *, size_t *), int(*frbuild)(netsnmp_session *, netsnmp_pdu *, u_char **, size_t *, size_t *), int(*fcheck)(u_char *, size_t), netsnmp_pdu *(*fcreate_pdu)(netsnmp_transport *, void *, size_t))" -1c "void * snmp_sess_add (netsnmp_session *in_session, netsnmp_transport *transport, int(*fpre_parse)(netsnmp_session *, netsnmp_transport *, void *, int), int(*fpost_parse)(netsnmp_session *, netsnmp_pdu *, int))" -1c "void * snmp_sess_open (netsnmp_session *pss)" -1c "int create_user_from_session (netsnmp_session *session)" -1c "int snmp_sess_close (void *sessp)" -1c "int snmp_close (netsnmp_session *session)" -1c "int snmp_close_sessions (void)" -1c "int snmpv3_packet_build (netsnmp_session *session, netsnmp_pdu *pdu, u_char *packet, size_t *out_length, u_char *pdu_data, size_t pdu_data_len)" -1c "u_char * snmp_pdu_build (netsnmp_pdu *pdu, u_char *cp, size_t *out_length)" -1c "int snmpv3_parse (netsnmp_pdu *pdu, u_char *data, size_t *length, u_char **after_header, netsnmp_session *sess)" -1c "int snmpv3_make_report (netsnmp_pdu *pdu, int error)" -1c "int snmpv3_get_report_type (netsnmp_pdu *pdu)" -1c "int snmp_pdu_parse (netsnmp_pdu *pdu, u_char *data, size_t *length)" -1c "u_char * snmpv3_scopedPDU_parse (netsnmp_pdu *pdu, u_char *cp, size_t *length)" -1c "int snmp_send (netsnmp_session *session, netsnmp_pdu *pdu)" -1c "int snmp_sess_send (void *sessp, netsnmp_pdu *pdu)" -1c "int snmp_async_send (netsnmp_session *session, netsnmp_pdu *pdu, snmp_callback callback, void *cb_data)" -1c "int snmp_sess_async_send (void *sessp, netsnmp_pdu *pdu, snmp_callback callback, void *cb_data)" -1c "void snmp_free_var (netsnmp_variable_list *var)" -1c "void snmp_free_varbind (netsnmp_variable_list *var)" -1c "void snmp_free_pdu (netsnmp_pdu *pdu)" -1c "netsnmp_pdu * snmp_create_sess_pdu (netsnmp_transport *transport, void *opaque, size_t olength)" -1c "void snmp_read (fd_set *fdset)" -1c "int _sess_read (void *sessp, fd_set *fdset)" -1c "int snmp_sess_read (void *sessp, fd_set *fdset)" -1c "int snmp_select_info (int *numfds, fd_set *fdset, struct timeval *timeout, int *block)" -1c "int snmp_sess_select_info (void *sessp, int *numfds, fd_set *fdset, struct timeval *timeout, int *block)" -1c "void snmp_timeout (void)" -1c "void snmp_sess_timeout (void *sessp)" -1c "int snmp_oid_ncompare (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2, size_t max_len)" -1c "int snmp_oid_compare (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2)" "lexicographical compare two object identifiers. " -1c "int snmp_oidtree_compare (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2)" "Compares 2 OIDs to determine if they are equal up until the shortest length. " -1c "int netsnmp_oid_equals (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2)" "Compares 2 OIDs to determine if they are exactly equal. " -1c "int netsnmp_oid_is_subtree (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2)" "Identical to netsnmp_oid_equals, except only the length up to len1 is compared. " -1c "int netsnmp_oid_find_prefix (const oid *in_name1, size_t len1, const oid *in_name2, size_t len2)" "Given two OIDs, determine the common prefix to them both. " -1c "netsnmp_variable_list * snmp_pdu_add_variable (netsnmp_pdu *pdu, const oid *name, size_t name_length, u_char type, const u_char *value, size_t len)" -1c "netsnmp_variable_list * snmp_varlist_add_variable (netsnmp_variable_list **varlist, const oid *name, size_t name_length, u_char type, const u_char *value, size_t len)" -1c "int snmp_add_var (netsnmp_pdu *pdu, const oid *name, size_t name_length, char type, const char *value)" -1c "void * snmp_sess_pointer (netsnmp_session *session)" -1c "netsnmp_session * snmp_sess_session (void *sessp)" -1c "netsnmp_transport * snmp_sess_transport (void *sessp)" -1c "void snmp_sess_transport_set (void *sp, netsnmp_transport *t)" -1c "oid * snmp_duplicate_objid (const oid *objToCopy, size_t objToCopyLen)" -1c "u_int snmp_increment_statistic (int which)" -1c "u_int snmp_increment_statistic_by (int which, int count)" -1c "u_int snmp_get_statistic (int which)" -1c "void snmp_init_statistics (void)" -1c "Variables" +1c -1c "netsnmp_subtree * subtrees" -1c "long long_return" -1c "u_char return_buf [258]" -1c "timeval starttime" -1c "int callback_master_num = -1" -1c "oid nullOid [] = { 0, 0 }" -1c "int nullOidLen = sizeof(nullOid)" -1c "session_list * Sessions = NULL" -1c "int snmp_errno = 0" -1c "long long_return" -1c "u_char return_buf []" -1c "oid nullOid []" -1c "int nullOidLen" -1c
overlay(3x), overwrite(3x), copywin(3x) - overlay and manipulate overlapped curses windows
pax(1) - read and write file archives and copy directory hierarchies
pbcopy(1), pbpaste(1) - provide copying and pasting to the pasteboard (the Clipboard) from command line
rcp(1) - remote file copy
scp(1) - secure copy (remote file copy program)
================================================== =====================
The results don't seem to be equivalent to me....what am I missing?
Thanks for your help.
-Bill
|