Updates to usage, and made tar work.

-Erik
This commit is contained in:
Eric Andersen
1999-11-10 23:13:02 +00:00
parent 84d8568071
commit d73dc5b073
63 changed files with 290 additions and 230 deletions

View File

@@ -27,7 +27,7 @@
#include <errno.h>
static const char chroot_usage[] = "NEWROOT [COMMAND...]\n"
static const char chroot_usage[] = "chroot NEWROOT [COMMAND...]\n\n"
"Run COMMAND with root directory set to NEWROOT.\n";

View File

@@ -28,7 +28,7 @@
#include <dirent.h>
static const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n"
" or: cp [OPTION]... SOURCE... DIRECTORY\n"
" or: cp [OPTION]... SOURCE... DIRECTORY\n\n"
"Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
"\n"
"\t-a\tsame as -dpR\n"

View File

@@ -35,7 +35,7 @@
mail commands */
static const char date_usage[] = "date [OPTION]... [+FORMAT]\n"
" or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n"
" or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n\n"
"Display the current time in the given FORMAT, or set the system date.\n"
"\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n"
"\t-s\t\tset time described by STRING\n"

View File

@@ -34,7 +34,7 @@
#include <errno.h>
static const char dd_usage[] =
"dd [if=name] [of=name] [bs=n] [count=n]\n"
"dd [if=name] [of=name] [bs=n] [count=n]\n\n"
"Copy a file, converting and formatting according to options\n\n"
"\tif=FILE\tread from FILE instead of stdin\n"
"\tof=FILE\twrite to FILE instead of stout\n"
@@ -227,8 +227,7 @@ extern int dd_main (int argc, char **argv)
exit( TRUE);
usage:
fprintf (stderr, "%s", dd_usage);
exit( FALSE);
usage( dd_usage);
}

View File

@@ -27,9 +27,9 @@
#include <errno.h>
static const char ln_usage[] = "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n"
"Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n"
"\nOptions:\n"
static const char ln_usage[] = "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n\n"
"Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n\n"
"Options:\n"
"\t-s\tmake symbolic links instead of hard links\n"
"\t-f\tremove existing destination files\n";

View File

@@ -26,10 +26,11 @@
#include <errno.h>
#include <sys/param.h>
static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n"
static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n\n"
"Create the DIRECTORY(ies), if they do not already exist\n\n"
"-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
"-p\tno error if existing, make parent directories as needed\n";
"Options:\n"
"\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
"\t-p\tno error if existing, make parent directories as needed\n";
static int parentFlag = FALSE;

View File

@@ -27,9 +27,9 @@
#include <fcntl.h>
#include <unistd.h>
static const char mknod_usage[] = "mknod file b|c|u|p major minor\n"
"\tMake special files.\n"
"\n"
static const char mknod_usage[] = "mknod [OPTION]... NAME TYPE MAJOR MINOR\n\n"
"Make block or character special files.\n\n"
"Options:\n"
"\tb:\tMake a block (buffered) device.\n"
"\tc or u:\tMake a character (un-buffered) device.\n"
"\tp:\tMake a named pipe. Major and minor are ignored for named pipes.\n";

View File

@@ -29,7 +29,7 @@
static const char mv_usage[] = "mv SOURCE DEST\n"
" or: mv SOURCE... DIRECTORY\n"
" or: mv SOURCE... DIRECTORY\n\n"
"Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n";

View File

@@ -27,8 +27,9 @@
#include <utime.h>
#include <dirent.h>
static const char* rm_usage = "rm [OPTION]... FILE...\n"
static const char* rm_usage = "rm [OPTION]... FILE...\n\n"
"Remove (unlink) the FILE(s).\n\n"
"Options:\n"
"\t-f\tremove existing destinations, never prompt\n"
"\t-r\tremove the contents of directories recursively\n";

View File

@@ -29,7 +29,7 @@
extern int rmdir_main(int argc, char **argv)
{
if ( argc==1 || **(argv+1) == '-' ) {
usage( "rmdir [OPTION]... DIRECTORY...\nRemove the DIRECTORY(ies), if they are empty.");
usage( "rmdir [OPTION]... DIRECTORY...\n\nRemove the DIRECTORY(ies), if they are empty.\n");
}
while (--argc > 0) {

View File

@@ -23,8 +23,8 @@
#include "internal.h"
#include <stdio.h>
const char sleep_usage[] = " NUMBER\n"
"Pause for NUMBER seconds.\n";
const char sleep_usage[] = "sleep N\n\n"
"Pause for N seconds.\n";
extern int
sleep_main(int argc, char * * argv)

View File

@@ -27,7 +27,7 @@ extern int
sync_main(int argc, char * * argv)
{
if ( argc>1 && **(argv+1) == '-' ) {
usage( "sync\nWrite all buffered filesystem blocks to disk.\n");
usage( "sync\n\nWrite all buffered filesystem blocks to disk.\n");
}
exit( sync());
}

View File

@@ -31,7 +31,7 @@
static const char touch_usage[] = "touch [-c] file [file ...]\n\n"
"\tUpdate the last-modified date on the given file[s].\n";
"Update the last-modified date on the given file[s].\n";
@@ -54,7 +54,7 @@ touch_main(int argc, char **argv)
create = FALSE;
break;
default:
fprintf(stderr, "Unknown option: %c\n", **argv);
usage( touch_usage);
exit( FALSE);
}
argc--;

View File

@@ -41,8 +41,9 @@
static const char uname_usage[] =
"uname [OPTION]...\n"
"Print certain system information. With no OPTION, same as -s.\n"
"uname [OPTION]...\n\n"
"Print certain system information. With no OPTION, same as -s.\n\n"
"Options:\n"
"\t-a\tprint all information\n"
"\t-m\tthe machine (hardware) type\n"
"\t-n\tprint the machine's network node hostname\n"