Re: Source code of ln command
Greg, Thanks for the info. Could you tell me what is the best way to copy the whole source codes to my machine, so it's easy for me to find and understand in details some system functions? Your help is much appreciated. Best regards, Thuan - Original Message - From: Greg 'groggy' Lehey [EMAIL PROTECTED] To: Bill Moran [EMAIL PROTECTED] Cc: Thuan Truong [EMAIL PROTECTED]; FreeBSD-Questions [EMAIL PROTECTED] Sent: Thursday, May 06, 2004 9:18 PM Subject: Re: Source code of ln command ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Source code of ln command
On Friday, 7 May 2004 at 10:00:50 -0400, Thuan Truong wrote: Greg, Thanks for the info. Could you tell me what is the best way to copy the whole source codes to my machine, so it's easy for me to find and understand in details some system functions? This is a FAQ. The source code is included with all distributions of FreeBSD. Take a look at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors.html. Greg -- Note: I discard all HTML mail unseen. Finger [EMAIL PROTECTED] for PGP public key. See complete headers for address and phone numbers. pgp0.pgp Description: PGP signature
Re: Source code of ln command
On Wednesday, 5 May 2004 at 9:10:27 -0400, Bill Moran wrote: Thuan Truong wrote: I would like to have the source code of 'ln' (make hard or symbolic links to files) command from Free-BSD ftp site. Please let me know how and where to unload it. If you installed source on your FreeBSD system, it's in /usr/src/bin/ln Otherwise, you can download any version you want from cvs: http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ln/ Note that ln(1) is a relatively simple interface to link(2), which is in the kernel. Here's the complete source of the version supplied with the Sixth Edition of UNIX: main(argc, argv) char **argv; { static struct ibuf statb; register char *np; if (argc2) { write(1, Usage: ln target [ newname ]\n, 29); exit(1); } if (argc==2) { np = argv[1]; while(*np++); while (*--np!='/' npargv[1]); np++; argv[2] = np; } stat(argv[1], statb); if ((statb.iflagsFMT) == DIR) { write(1, No directory link\n, 18); exit(1); } if (link(argv[1], argv[2])0) { write(1, Can't link\n, 11); exit(1); } exit(0); } Greg -- Note: I discard all HTML mail unseen. Finger [EMAIL PROTECTED] for PGP public key. See complete headers for address and phone numbers. pgpeA4RmV3yXs.pgp Description: PGP signature
Source code of ln command
Clear DayHi Free-BSD, I would like to have the source code of 'ln' (make hard or symbolic links to files) command from Free-BSD ftp site. Please let me know how and where to unload it. Thanks, Andy Truong Overtone Software, Inc. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Source code of ln command
Thuan Truong wrote: Clear DayHi Free-BSD, I would like to have the source code of 'ln' (make hard or symbolic links to files) command from Free-BSD ftp site. Please let me know how and where to unload it. If you installed source on your FreeBSD system, it's in /usr/src/bin/ln Otherwise, you can download any version you want from cvs: http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ln/ -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]