chown.c (573414e0c17b0c97f1f8f660a0aa73fbb7443078) | chown.c (cc09f59a1e6d909dc7dd6e64a025eee07ed4065d) |
---|---|
1/* 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; 43#else 44static const char rcsid[] = | 1/* 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; 43#else 44static const char rcsid[] = |
45 "$Id$"; | 45 "$Id: chown.c,v 1.7 1997/08/24 02:10:29 steve Exp $"; |
46#endif 47#endif /* not lint */ 48 49#include <sys/param.h> 50#include <sys/stat.h> 51 52#include <ctype.h> 53#include <dirent.h> --- 63 unchanged lines hidden (view full) --- 117 argc -= optind; 118 119 if (argc < 2) 120 usage(); 121 122 fts_options = FTS_PHYSICAL; 123 if (Rflag) { 124 if (hflag) | 46#endif 47#endif /* not lint */ 48 49#include <sys/param.h> 50#include <sys/stat.h> 51 52#include <ctype.h> 53#include <dirent.h> --- 63 unchanged lines hidden (view full) --- 117 argc -= optind; 118 119 if (argc < 2) 120 usage(); 121 122 fts_options = FTS_PHYSICAL; 123 if (Rflag) { 124 if (hflag) |
125 errx(1, 126 "the -R and -h options may not be specified together."); | 125 errx(1, "the -R and -h options may not be specified together"); |
127 if (Hflag) 128 fts_options |= FTS_COMFOLLOW; 129 if (Lflag) { 130 fts_options &= ~FTS_PHYSICAL; 131 fts_options |= FTS_LOGICAL; 132 } 133 } 134 --- 126 unchanged lines hidden (view full) --- 261 errx(1, "you are not a member of group %s", gname); 262 } 263 warn("%s", file); 264} 265 266void 267usage() 268{ | 126 if (Hflag) 127 fts_options |= FTS_COMFOLLOW; 128 if (Lflag) { 129 fts_options &= ~FTS_PHYSICAL; 130 fts_options |= FTS_LOGICAL; 131 } 132 } 133 --- 126 unchanged lines hidden (view full) --- 260 errx(1, "you are not a member of group %s", gname); 261 } 262 warn("%s", file); 263} 264 265void 266usage() 267{ |
269 (void)fprintf(stderr, 270 "usage: %s [-R [-H | -L | -P]] [-f] [-h] %s file ...\n", 271 myname, ischown ? "[owner][:group]" : "group"); | 268 (void)fprintf(stderr, "%s\n%s\n%s\n", 269 "usage: chown [-R [-H | -L | -P]] [-f] [-h] owner[:group] file ...", 270 " chown [-R [-H | -L | -P]] [-f] [-h] :group file ...", 271 " chgrp [-R [-H | -L | -P]] [-f] [-h] group file ..."); |
272 exit(1); 273} | 272 exit(1); 273} |