diff --git a/basename.1 b/basename.1 index 69f29db..a2247ca 100644 --- a/basename.1 +++ b/basename.1 @@ -12,3 +12,5 @@ prints the with any leading path components, and the .IR suffix , removed. +.SH SEE ALSO +.IR basename (3) diff --git a/chown.1 b/chown.1 index d32e213..a196974 100644 --- a/chown.1 +++ b/chown.1 @@ -13,3 +13,5 @@ changes the user or group ownership for the given files. .TP .B -R, -r change directory ownership recursively. +.SH SEE ALSO +.IR chown (2) diff --git a/date.1 b/date.1 index e563ea2..2e174bd 100644 --- a/date.1 +++ b/date.1 @@ -11,10 +11,12 @@ date \- print date and time prints the date and time. If a .I format is given it is used to format the date as per -.BR strftime (3). +.IR strftime (3). .SH OPTIONS .TP .BI \-d " time" prints .I time instead of the system time, given as the number of seconds since the Unix epoch. +.SH SEE ALSO +.IR strftime (3) diff --git a/dirname.1 b/dirname.1 index dd45108..ba25657 100644 --- a/dirname.1 +++ b/dirname.1 @@ -9,3 +9,5 @@ dirname \- strip final path component prints the .I string with its final path component removed. +.SH SEE ALSO +.IR dirname (3) diff --git a/grep.1 b/grep.1 index 3a1cff8..6402dec 100644 --- a/grep.1 +++ b/grep.1 @@ -9,7 +9,7 @@ grep \- search files for a pattern .SH DESCRIPTION .B grep searches the input files for lines that match the pattern, a regular expression as defined in -.BR regex (7). +.IR regex (7). By default each matching line is printed to stdout. If no file is given, grep reads from stdin. .P @@ -36,3 +36,5 @@ prints nothing, only returns status. selects lines which do .B not match the pattern. +.SH SEE ALSO +.IR regex (7) diff --git a/head.c b/head.c index f836e3b..b23388e 100644 --- a/head.c +++ b/head.c @@ -38,7 +38,7 @@ void head(FILE *fp, const char *str, long n) { char buf[BUFSIZ]; - int i; + long i; for(i = 0; i < n && fgets(buf, sizeof buf, fp); i++) fputs(buf, stdout); diff --git a/ln.1 b/ln.1 index 19e5801..bb3c408 100644 --- a/ln.1 +++ b/ln.1 @@ -20,3 +20,8 @@ be linked into the given directory. .TP .B \-s create a symbolic link. +.SH SEE ALSO +.IR cp (1), +.IR mv (1), +.IR link (2), +.IR symlink (2) diff --git a/mkfifo.1 b/mkfifo.1 index f41ef1b..8ff8da3 100644 --- a/mkfifo.1 +++ b/mkfifo.1 @@ -7,3 +7,5 @@ mkfifo \- make named pipe .SH DESCRIPTION .B mkfifo creates named pipes (FIFOs) with the given names. +.SH SEE ALSO +.IR mkfifo (3) diff --git a/pwd.1 b/pwd.1 index 66b8ef8..fe56c71 100644 --- a/pwd.1 +++ b/pwd.1 @@ -6,3 +6,5 @@ pwd \- print working directory .SH DESCRIPTION .B pwd prints the path of the current working directory. +.SH SEE ALSO +.IR getcwd (3) diff --git a/rm.1 b/rm.1 index f61700b..3adbf3f 100644 --- a/rm.1 +++ b/rm.1 @@ -15,3 +15,5 @@ ignore files that cannot be removed. .TP .B \-r remove directories recursively. +.SH SEE ALSO +.IR remove (3) diff --git a/sleep.1 b/sleep.1 index 3ddab7e..fa9e6f4 100644 --- a/sleep.1 +++ b/sleep.1 @@ -7,3 +7,5 @@ sleep \- wait for a number of seconds .SH DESCRIPTION .B sleep waits until the given number of seconds have elapsed. +.SH SEE ALSO +.IR sleep (3) diff --git a/touch.1 b/touch.1 index 33daba0..85a1118 100644 --- a/touch.1 +++ b/touch.1 @@ -20,3 +20,6 @@ do not create files if they do not exist. sets the files' modification time to .IR time , given as the number of seconds since the Unix epoch. +.SH SEE ALSO +.IR utime (2), +.IR creat (2)