summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vg-suppressions19
-rw-r--r--COPYING25
-rw-r--r--ChangeLog347
-rw-r--r--ChangeLog-20059
-rw-r--r--Makefile.am20
-rw-r--r--NEWS12
-rw-r--r--README13
-rw-r--r--README-valgrind18
-rw-r--r--TODO19
-rwxr-xr-xannounce-gen19
-rw-r--r--build-aux/ChangeLog16
-rwxr-xr-xbuild-aux/vc-list-files19
-rw-r--r--doc/ChangeLog23
-rw-r--r--doc/Makefile.am21
-rw-r--r--doc/coreutils.texi17
-rw-r--r--doc/fdl.texi (renamed from doc/doclicense.texi)399
-rw-r--r--doc/getdate.texi2
-rw-r--r--doc/perm.texi12
-rw-r--r--lib/.gdb-history35
-rw-r--r--lib/ChangeLog25
-rw-r--r--lib/TODO8
-rw-r--r--lib/__fpending.h20
-rw-r--r--lib/fdopendir-glibc.c18
-rw-r--r--lib/fprintftime.h18
-rw-r--r--lib/root-dev-ino.h18
-rw-r--r--lib/savedir.c4
-rw-r--r--lib/savedir.h2
-rw-r--r--lib/search_.h19
-rwxr-xr-xlib/t-chdir-long19
-rw-r--r--lib/t-fpending.c20
-rw-r--r--m4/ChangeLog15
-rw-r--r--m4/check-decl.m49
-rw-r--r--man/Makefile.am21
-rw-r--r--man/chmod.x5
-rw-r--r--man/chown.x5
-rw-r--r--man/df.x5
-rw-r--r--man/du.x5
-rw-r--r--man/rm.x6
-rw-r--r--old/fileutils/ChangeLog16
-rw-r--r--old/fileutils/ChangeLog-199710
-rw-r--r--old/fileutils/NEWS12
-rw-r--r--old/sh-utils/ChangeLog16
-rw-r--r--old/sh-utils/ChangeLog.010
-rw-r--r--old/sh-utils/NEWS12
-rw-r--r--old/textutils/ChangeLog15
-rw-r--r--old/textutils/NEWS12
-rw-r--r--po/ChangeLog15
-rw-r--r--po/Makevars17
-rw-r--r--src/dircolors.hin5
-rwxr-xr-xsrc/du-tests17
-rw-r--r--src/extract-magic19
-rw-r--r--src/tac-pipe.c18
-rw-r--r--src/uname.c2
-rwxr-xr-xsrc/wheel-gen.pl17
-rw-r--r--tests/Coreutils.pm20
-rw-r--r--tests/Makefile.am.in20
-rw-r--r--tests/acl19
-rwxr-xr-xtests/chgrp/basic18
-rwxr-xr-xtests/chgrp/deref17
-rwxr-xr-xtests/chgrp/no-x17
-rwxr-xr-xtests/chgrp/posix-H17
-rwxr-xr-xtests/chgrp/recurse17
-rwxr-xr-xtests/chmod/c-option17
-rwxr-xr-xtests/chmod/equal-x19
-rwxr-xr-xtests/chmod/equals18
-rwxr-xr-xtests/chmod/no-x17
-rwxr-xr-xtests/chmod/octal17
-rwxr-xr-xtests/chmod/setgid17
-rwxr-xr-xtests/chmod/umask-x17
-rwxr-xr-xtests/chmod/usage17
-rwxr-xr-xtests/chown/basic17
-rwxr-xr-xtests/chown/deref17
-rwxr-xr-xtests/chown/separator17
-rw-r--r--tests/cp/Makefile.am21
-rwxr-xr-xtests/cp/acl17
-rwxr-xr-xtests/cp/backup-118
-rwxr-xr-xtests/cp/backup-is-src19
-rwxr-xr-xtests/cp/cp-HL19
-rwxr-xr-xtests/cp/cp-deref17
-rwxr-xr-xtests/cp/cp-mv-backup17
-rwxr-xr-xtests/cp/cp-parents17
-rwxr-xr-xtests/cp/deref-slink17
-rwxr-xr-xtests/cp/dir-rm-dest17
-rwxr-xr-xtests/cp/dir-slash17
-rwxr-xr-xtests/cp/dir-vs-file17
-rwxr-xr-xtests/cp/fail-perm18
-rwxr-xr-xtests/cp/into-self18
-rwxr-xr-xtests/cp/link17
-rwxr-xr-xtests/cp/link-no-deref17
-rwxr-xr-xtests/cp/link-preserve17
-rwxr-xr-xtests/cp/no-deref-link117
-rwxr-xr-xtests/cp/no-deref-link217
-rwxr-xr-xtests/cp/no-deref-link317
-rwxr-xr-xtests/cp/perm17
-rwxr-xr-xtests/cp/preserve-217
-rwxr-xr-xtests/cp/r-vs-symlink18
-rwxr-xr-xtests/cp/same-file18
-rwxr-xr-xtests/cp/slink-2-slink17
-rwxr-xr-xtests/cp/special-bits17
-rwxr-xr-xtests/cp/symlink-slash17
-rw-r--r--tests/cut/Makefile.am19
-rwxr-xr-xtests/cut/Test.pm20
-rwxr-xr-xtests/dd/misc17
-rwxr-xr-xtests/dd/not-rewound17
-rwxr-xr-xtests/dd/skip-seek19
-rwxr-xr-xtests/dd/skip-seek217
-rwxr-xr-xtests/dd/unblock-sync17
-rwxr-xr-xtests/dircolors/simple18
-rwxr-xr-xtests/du/2g17
-rwxr-xr-xtests/du/8gb17
-rw-r--r--tests/du/Makefile.am21
-rwxr-xr-xtests/du/basic17
-rwxr-xr-xtests/du/deref17
-rwxr-xr-xtests/du/deref-args17
-rwxr-xr-xtests/du/exclude17
-rwxr-xr-xtests/du/fd-leak17
-rwxr-xr-xtests/du/files0-from17
-rwxr-xr-xtests/du/hard-link17
-rwxr-xr-xtests/du/inaccessible-cwd18
-rwxr-xr-xtests/du/long-from-unreadable19
-rwxr-xr-xtests/du/long-sloop17
-rwxr-xr-xtests/du/no-deref19
-rwxr-xr-xtests/du/no-x17
-rwxr-xr-xtests/du/restore-wd17
-rwxr-xr-xtests/du/slash17
-rwxr-xr-xtests/du/slink17
-rwxr-xr-xtests/du/trailing-slash18
-rwxr-xr-xtests/du/two-args17
-rw-r--r--tests/envvar-check20
-rw-r--r--tests/expensive19
-rwxr-xr-xtests/expr/basic19
-rwxr-xr-xtests/factor/basic19
-rwxr-xr-xtests/fmt/basic19
-rwxr-xr-xtests/fmt/long-line17
-rw-r--r--tests/general/Makefile.am2
-rw-r--r--tests/general/atgeneral.m42
-rw-r--r--tests/general/dd.at17
-rw-r--r--tests/group-names17
-rw-r--r--tests/head/Makefile.am19
-rw-r--r--tests/head/Test.pm20
-rwxr-xr-xtests/help-version18
-rwxr-xr-xtests/install/basic-119
-rwxr-xr-xtests/install/create-leading18
-rwxr-xr-xtests/install/d-slashdot17
-rwxr-xr-xtests/install/trap17
-rw-r--r--tests/join/Makefile.am20
-rw-r--r--tests/join/Test.pm19
-rwxr-xr-xtests/ln/backup-118
-rwxr-xr-xtests/ln/misc18
-rwxr-xr-xtests/ln/sf-118
-rwxr-xr-xtests/ln/target-119
-rwxr-xr-xtests/ls-2/tests18
-rw-r--r--tests/ls/Makefile.am20
-rw-r--r--tests/ls/Test.pm19
-rwxr-xr-xtests/ls/dangle17
-rwxr-xr-xtests/ls/dired17
-rwxr-xr-xtests/ls/file-type17
-rwxr-xr-xtests/ls/follow-slink17
-rwxr-xr-xtests/ls/infloop17
-rwxr-xr-xtests/ls/inode17
-rwxr-xr-xtests/ls/m-option17
-rwxr-xr-xtests/ls/no-arg17
-rwxr-xr-xtests/ls/recursive17
-rwxr-xr-xtests/ls/rt-117
-rwxr-xr-xtests/ls/stat-dtype18
-rwxr-xr-xtests/ls/stat-failed17
-rwxr-xr-xtests/ls/stat-vs-dirent17
-rwxr-xr-xtests/ls/symlink-slash17
-rwxr-xr-xtests/ls/time-118
-rwxr-xr-xtests/md5sum/basic-118
-rwxr-xr-xtests/md5sum/newline-118
-rw-r--r--tests/misc/Makefile.am20
-rwxr-xr-xtests/misc/base6417
-rwxr-xr-xtests/misc/basename17
-rwxr-xr-xtests/misc/cat-proc17
-rwxr-xr-xtests/misc/close-stdout17
-rwxr-xr-xtests/misc/csplit18
-rwxr-xr-xtests/misc/date18
-rwxr-xr-xtests/misc/date-sec17
-rwxr-xr-xtests/misc/df17
-rwxr-xr-xtests/misc/dirname18
-rwxr-xr-xtests/misc/expand17
-rwxr-xr-xtests/misc/false-status17
-rwxr-xr-xtests/misc/fold17
-rwxr-xr-xtests/misc/head-c19
-rwxr-xr-xtests/misc/head-elide-tail17
-rwxr-xr-xtests/misc/head-pos17
-rwxr-xr-xtests/misc/mknod17
-rwxr-xr-xtests/misc/nice19
-rwxr-xr-xtests/misc/nl17
-rwxr-xr-xtests/misc/nohup17
-rwxr-xr-xtests/misc/paste-no-nl17
-rwxr-xr-xtests/misc/pathchk117
-rwxr-xr-xtests/misc/printf17
-rwxr-xr-xtests/misc/printf-hex17
-rwxr-xr-xtests/misc/pwd-long18
-rwxr-xr-xtests/misc/sha224sum18
-rwxr-xr-xtests/misc/sha256sum18
-rwxr-xr-xtests/misc/sha384sum18
-rwxr-xr-xtests/misc/sha512sum18
-rwxr-xr-xtests/misc/shuf17
-rwxr-xr-xtests/misc/sort-merge18
-rwxr-xr-xtests/misc/sort-rand17
-rwxr-xr-xtests/misc/split-a17
-rwxr-xr-xtests/misc/split-fail17
-rwxr-xr-xtests/misc/split-l17
-rwxr-xr-xtests/misc/stat-fmt17
-rwxr-xr-xtests/misc/stat-printf18
-rwxr-xr-xtests/misc/tac-continue17
-rwxr-xr-xtests/misc/test-diag18
-rwxr-xr-xtests/misc/tty-eof18
-rwxr-xr-xtests/misc/wc-files017
-rwxr-xr-xtests/misc/wc-files0-from17
-rwxr-xr-xtests/mk-script19
-rwxr-xr-xtests/mkdir/concurrent-118
-rwxr-xr-xtests/mkdir/p-118
-rwxr-xr-xtests/mkdir/p-217
-rwxr-xr-xtests/mkdir/p-317
-rwxr-xr-xtests/mkdir/p-slashdot17
-rwxr-xr-xtests/mkdir/p-thru-slink17
-rwxr-xr-xtests/mkdir/parents17
-rwxr-xr-xtests/mkdir/perm18
-rwxr-xr-xtests/mkdir/special-117
-rwxr-xr-xtests/mkdir/t-slash17
-rwxr-xr-xtests/mkdir/writable-under-readonly17
-rw-r--r--tests/mv/Makefile.am21
-rwxr-xr-xtests/mv/acl17
-rwxr-xr-xtests/mv/atomic17
-rwxr-xr-xtests/mv/backup-is-src17
-rwxr-xr-xtests/mv/childproof17
-rwxr-xr-xtests/mv/diag17
-rwxr-xr-xtests/mv/dir-file17
-rwxr-xr-xtests/mv/dir2dir17
-rwxr-xr-xtests/mv/dup-source17
-rwxr-xr-xtests/mv/force17
-rwxr-xr-xtests/mv/hard-217
-rwxr-xr-xtests/mv/hard-319
-rwxr-xr-xtests/mv/hard-417
-rwxr-xr-xtests/mv/hard-link-117
-rwxr-xr-xtests/mv/i-118
-rwxr-xr-xtests/mv/i-217
-rwxr-xr-xtests/mv/i-317
-rwxr-xr-xtests/mv/i-417
-rwxr-xr-xtests/mv/i-link-no17
-rwxr-xr-xtests/mv/into-self17
-rwxr-xr-xtests/mv/into-self-217
-rwxr-xr-xtests/mv/into-self-317
-rwxr-xr-xtests/mv/into-self-417
-rwxr-xr-xtests/mv/leak-fd18
-rwxr-xr-xtests/mv/mv-special-119
-rwxr-xr-xtests/mv/no-target-dir17
-rwxr-xr-xtests/mv/part-fail17
-rwxr-xr-xtests/mv/part-hardlink17
-rwxr-xr-xtests/mv/part-rename17
-rwxr-xr-xtests/mv/part-symlink17
-rwxr-xr-xtests/mv/partition-perm17
-rwxr-xr-xtests/mv/perm-117
-rwxr-xr-xtests/mv/reply-no17
-rwxr-xr-xtests/mv/setup17
-rwxr-xr-xtests/mv/to-symlink17
-rwxr-xr-xtests/mv/trailing-slash17
-rwxr-xr-xtests/mv/update17
-rw-r--r--tests/mv/vfat17
-rwxr-xr-xtests/od/od-N17
-rwxr-xr-xtests/od/x817
-rw-r--r--tests/pr/Makefile.am20
-rw-r--r--tests/pr/Test.pm19
-rw-r--r--tests/priv-check17
-rwxr-xr-xtests/readlink/can-e17
-rwxr-xr-xtests/readlink/can-f17
-rwxr-xr-xtests/readlink/can-m17
-rwxr-xr-xtests/readlink/rl-117
-rw-r--r--tests/rm/Makefile.am21
-rwxr-xr-xtests/rm/cycle17
-rwxr-xr-xtests/rm/dangling-symlink17
-rwxr-xr-xtests/rm/deep-119
-rwxr-xr-xtests/rm/dir-no-w17
-rwxr-xr-xtests/rm/dir-nonrecur17
-rwxr-xr-xtests/rm/dot-rel17
-rwxr-xr-xtests/rm/empty-inacc17
-rwxr-xr-xtests/rm/empty-name19
-rwxr-xr-xtests/rm/f-118
-rwxr-xr-xtests/rm/fail-2eperm17
-rwxr-xr-xtests/rm/fail-eperm17
-rwxr-xr-xtests/rm/hash17
-rwxr-xr-xtests/rm/i-118
-rwxr-xr-xtests/rm/i-no-r17
-rwxr-xr-xtests/rm/inaccessible17
-rwxr-xr-xtests/rm/interactive-always17
-rwxr-xr-xtests/rm/interactive-once17
-rwxr-xr-xtests/rm/ir-119
-rwxr-xr-xtests/rm/isatty18
-rwxr-xr-xtests/rm/no-give-up17
-rwxr-xr-xtests/rm/r-119
-rwxr-xr-xtests/rm/r-219
-rwxr-xr-xtests/rm/r-320
-rwxr-xr-xtests/rm/rm117
-rwxr-xr-xtests/rm/rm218
-rwxr-xr-xtests/rm/rm317
-rwxr-xr-xtests/rm/rm417
-rwxr-xr-xtests/rm/rm517
-rwxr-xr-xtests/rm/sunos-119
-rwxr-xr-xtests/rm/unread217
-rwxr-xr-xtests/rm/unread317
-rwxr-xr-xtests/rm/unreadable18
-rwxr-xr-xtests/rmdir/fail-perm17
-rwxr-xr-xtests/rmdir/ignore17
-rwxr-xr-xtests/rmdir/t-slash17
-rwxr-xr-xtests/rwx-to-mode17
-rw-r--r--tests/sample-test17
-rwxr-xr-xtests/seq/basic18
-rw-r--r--tests/setgid-check17
-rwxr-xr-xtests/sha1sum/basic-118
-rwxr-xr-xtests/sha1sum/sample-vec18
-rwxr-xr-xtests/shred/exact17
-rwxr-xr-xtests/shred/remove17
-rw-r--r--tests/sort-time/Makefile17
-rw-r--r--tests/sort-time/README19
-rwxr-xr-xtests/sort-time/rand-gen18
-rw-r--r--tests/sort/Makefile.am20
-rwxr-xr-xtests/sort/Test.pm20
-rwxr-xr-xtests/stty/basic-118
-rwxr-xr-xtests/stty/row-col-121
-rwxr-xr-xtests/sum/basic-118
-rwxr-xr-xtests/sum/sysv17
-rw-r--r--tests/tac/Makefile.am20
-rw-r--r--tests/tac/Test.pm19
-rw-r--r--tests/tail-2/Makefile.am20
-rwxr-xr-xtests/tail-2/append-only17
-rwxr-xr-xtests/tail-2/assert20
-rwxr-xr-xtests/tail-2/assert-217
-rwxr-xr-xtests/tail-2/big-4gb17
-rwxr-xr-xtests/tail-2/fflush18
-rwxr-xr-xtests/tail-2/infloop-117
-rwxr-xr-xtests/tail-2/proc-ksyms17
-rwxr-xr-xtests/tail-2/start-middle17
-rwxr-xr-xtests/tail-2/tail-n0f19
-rw-r--r--tests/tail/Makefile.am20
-rwxr-xr-xtests/tail/Test.pm20
-rwxr-xr-xtests/tee/basic17
-rwxr-xr-xtests/tee/dash17
-rw-r--r--tests/test/Makefile.am20
-rw-r--r--tests/test/Test.pm19
-rw-r--r--tests/touch/Makefile.am21
-rwxr-xr-xtests/touch/dangling-symlink17
-rwxr-xr-xtests/touch/empty-file19
-rwxr-xr-xtests/touch/fail-diag17
-rwxr-xr-xtests/touch/fifo17
-rwxr-xr-xtests/touch/no-create-missing17
-rwxr-xr-xtests/touch/no-rights17
-rwxr-xr-xtests/touch/not-owner17
-rwxr-xr-xtests/touch/obsolescent17
-rwxr-xr-xtests/touch/read-only17
-rwxr-xr-xtests/touch/relative17
-rw-r--r--tests/tr/Makefile.am20
-rwxr-xr-xtests/tr/Test.pm20
-rw-r--r--tests/tr/failures19
-rwxr-xr-xtests/tsort/basic-119
-rwxr-xr-xtests/unexpand/basic-119
-rw-r--r--tests/uniq/Makefile.am20
-rw-r--r--tests/uniq/Test.pm20
-rw-r--r--tests/wc/Makefile.am20
-rwxr-xr-xtests/wc/Test.pm19
363 files changed, 6708 insertions, 233 deletions
diff --git a/.vg-suppressions b/.vg-suppressions
index 8aad5341e..1223a54bc 100644
--- a/.vg-suppressions
+++ b/.vg-suppressions
@@ -1,3 +1,22 @@
+# Suppress valgrind diagnostics we don't care about.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
{
libc_dl_open
Memcheck:Cond
diff --git a/COPYING b/COPYING
index 3912109b5..d511905c1 100644
--- a/COPYING
+++ b/COPYING
@@ -1,8 +1,8 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
-
+
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
-
+
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
@@ -303,10 +303,9 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
index 416f7a2a1..7be0cc81e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,341 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Copyright notice fixes.
+
+ * COPYING: Upgrade to latest version from FSF.
+
+ * src/uname.c: Use (C) in copyright notice.
+
+ * .vg-suppressions: Add copyright notice.
+ * ChangeLog: Likewise.
+ * ChangeLog-2005: Likewise.
+ * Makefile.am: Likewise.
+ * NEWS: Likewise.
+ * README: Likewise.
+ * README-valgrind: Likewise.
+ * TODO: Likewise.
+ * announce-gen: Likewise.
+ * man/Makefile.am: Likewise.
+ * man/chmod.x: Likewise.
+ * man/chown.x: Likewise.
+ * man/df.x: Likewise.
+ * man/du.x: Likewise.
+ * man/rm.x: Likewise.
+ * src/dircolors.hin: Likewise.
+ * src/du-tests: Likewise.
+ * src/extract-magic: Likewise.
+ * src/tac-pipe.c: Likewise.
+ * src/wheel-gen.pl: Likewise.
+ * tests/Coreutils.pm: Likewise.
+ * tests/Makefile.am.in: Likewise.
+ * tests/acl: Likewise.
+ * tests/envvar-check: Likewise.
+ * tests/expensive: Likewise.
+ * tests/group-names: Likewise.
+ * tests/help-version: Likewise.
+ * tests/mk-script: Likewise.
+ * tests/priv-check: Likewise.
+ * tests/rwx-to-mode: Likewise.
+ * tests/sample-test: Likewise.
+ * tests/setgid-check: Likewise.
+ * tests/chgrp/basic: Likewise.
+ * tests/chgrp/deref: Likewise.
+ * tests/chgrp/no-x: Likewise.
+ * tests/chgrp/posix-H: Likewise.
+ * tests/chgrp/recurse: Likewise.
+ * tests/chmod/c-option: Likewise.
+ * tests/chmod/equal-x: Likewise.
+ * tests/chmod/equals: Likewise.
+ * tests/chmod/no-x: Likewise.
+ * tests/chmod/octal: Likewise.
+ * tests/chmod/setgid: Likewise.
+ * tests/chmod/umask-x: Likewise.
+ * tests/chmod/usage: Likewise.
+ * tests/chown/basic: Likewise.
+ * tests/chown/deref: Likewise.
+ * tests/chown/separator: Likewise.
+ * tests/cp/Makefile.am: Likewise.
+ * tests/cp/acl: Likewise.
+ * tests/cp/backup-1: Likewise.
+ * tests/cp/backup-is-src: Likewise.
+ * tests/cp/cp-HL: Likewise.
+ * tests/cp/cp-deref: Likewise.
+ * tests/cp/cp-mv-backup: Likewise.
+ * tests/cp/cp-parents: Likewise.
+ * tests/cp/deref-slink: Likewise.
+ * tests/cp/dir-rm-dest: Likewise.
+ * tests/cp/dir-slash: Likewise.
+ * tests/cp/dir-vs-file: Likewise.
+ * tests/cp/fail-perm: Likewise.
+ * tests/cp/into-self: Likewise.
+ * tests/cp/link: Likewise.
+ * tests/cp/link-no-deref: Likewise.
+ * tests/cp/link-preserve: Likewise.
+ * tests/cp/no-deref-link1: Likewise.
+ * tests/cp/no-deref-link2: Likewise.
+ * tests/cp/no-deref-link3: Likewise.
+ * tests/cp/perm: Likewise.
+ * tests/cp/preserve-2: Likewise.
+ * tests/cp/r-vs-symlink: Likewise.
+ * tests/cp/same-file: Likewise.
+ * tests/cp/slink-2-slink: Likewise.
+ * tests/cp/special-bits: Likewise.
+ * tests/cp/symlink-slash: Likewise.
+ * tests/cut/Makefile.am: Likewise.
+ * tests/cut/Test.pm: Likewise.
+ * tests/dd/misc: Likewise.
+ * tests/dd/not-rewound: Likewise.
+ * tests/dd/skip-seek: Likewise.
+ * tests/dd/skip-seek2: Likewise.
+ * tests/dd/unblock-sync: Likewise.
+ * tests/dircolors/simple: Likewise.
+ * tests/du/2g: Likewise.
+ * tests/du/8gb: Likewise.
+ * tests/du/Makefile.am: Likewise.
+ * tests/du/basic: Likewise.
+ * tests/du/deref: Likewise.
+ * tests/du/deref-args: Likewise.
+ * tests/du/exclude: Likewise.
+ * tests/du/fd-leak: Likewise.
+ * tests/du/files0-from: Likewise.
+ * tests/du/hard-link: Likewise.
+ * tests/du/inaccessible-cwd: Likewise.
+ * tests/du/long-from-unreadable: Likewise.
+ * tests/du/long-sloop: Likewise.
+ * tests/du/no-deref: Likewise.
+ * tests/du/no-x: Likewise.
+ * tests/du/restore-wd: Likewise.
+ * tests/du/slash: Likewise.
+ * tests/du/slink: Likewise.
+ * tests/du/trailing-slash: Likewise.
+ * tests/du/two-args: Likewise.
+ * tests/expr/basic: Likewise.
+ * tests/factor/basic: Likewise.
+ * tests/fmt/basic: Likewise.
+ * tests/fmt/long-line: Likewise.
+ * tests/general/Makefile.am: Likewise.
+ * tests/general/atgeneral.m4: Likewise.
+ * tests/general/dd.at: Likewise.
+ * tests/head/Makefile.am: Likewise.
+ * tests/head/Test.pm: Likewise.
+ * tests/install/basic-1: Likewise.
+ * tests/install/create-leading: Likewise.
+ * tests/install/d-slashdot: Likewise.
+ * tests/install/trap: Likewise.
+ * tests/join/Makefile.am: Likewise.
+ * tests/join/Test.pm: Likewise.
+ * tests/ln/backup-1: Likewise.
+ * tests/ln/misc: Likewise.
+ * tests/ln/sf-1: Likewise.
+ * tests/ln/target-1: Likewise.
+ * tests/ls/Makefile.am: Likewise.
+ * tests/ls/Test.pm: Likewise.
+ * tests/ls/dangle: Likewise.
+ * tests/ls/dired: Likewise.
+ * tests/ls/file-type: Likewise.
+ * tests/ls/follow-slink: Likewise.
+ * tests/ls/infloop: Likewise.
+ * tests/ls/inode: Likewise.
+ * tests/ls/m-option: Likewise.
+ * tests/ls/no-arg: Likewise.
+ * tests/ls/recursive: Likewise.
+ * tests/ls/rt-1: Likewise.
+ * tests/ls/stat-dtype: Likewise.
+ * tests/ls/stat-failed: Likewise.
+ * tests/ls/stat-vs-dirent: Likewise.
+ * tests/ls/symlink-slash: Likewise.
+ * tests/ls/time-1: Likewise.
+ * tests/ls-2/tests: Likewise.
+ * tests/md5sum/basic-1: Likewise.
+ * tests/md5sum/newline-1: Likewise.
+ * tests/misc/Makefile.am: Likewise.
+ * tests/misc/base64: Likewise.
+ * tests/misc/basename: Likewise.
+ * tests/misc/cat-proc: Likewise.
+ * tests/misc/close-stdout: Likewise.
+ * tests/misc/csplit: Likewise.
+ * tests/misc/date: Likewise.
+ * tests/misc/date-sec: Likewise.
+ * tests/misc/df: Likewise.
+ * tests/misc/dirname: Likewise.
+ * tests/misc/expand: Likewise.
+ * tests/misc/false-status: Likewise.
+ * tests/misc/fold: Likewise.
+ * tests/misc/head-c: Likewise.
+ * tests/misc/head-elide-tail: Likewise.
+ * tests/misc/head-pos: Likewise.
+ * tests/misc/mknod: Likewise.
+ * tests/misc/nice: Likewise.
+ * tests/misc/nl: Likewise.
+ * tests/misc/nohup: Likewise.
+ * tests/misc/paste-no-nl: Likewise.
+ * tests/misc/pathchk1: Likewise.
+ * tests/misc/printf: Likewise.
+ * tests/misc/printf-hex: Likewise.
+ * tests/misc/pwd-long: Likewise.
+ * tests/misc/sha224sum: Likewise.
+ * tests/misc/sha256sum: Likewise.
+ * tests/misc/sha384sum: Likewise.
+ * tests/misc/sha512sum: Likewise.
+ * tests/misc/shuf: Likewise.
+ * tests/misc/sort-merge: Likewise.
+ * tests/misc/sort-rand: Likewise.
+ * tests/misc/split-a: Likewise.
+ * tests/misc/split-fail: Likewise.
+ * tests/misc/split-l: Likewise.
+ * tests/misc/stat-fmt: Likewise.
+ * tests/misc/stat-printf: Likewise.
+ * tests/misc/tac-continue: Likewise.
+ * tests/misc/test-diag: Likewise.
+ * tests/misc/tty-eof: Likewise.
+ * tests/misc/wc-files0: Likewise.
+ * tests/misc/wc-files0-from: Likewise.
+ * tests/mkdir/concurrent-1: Likewise.
+ * tests/mkdir/p-1: Likewise.
+ * tests/mkdir/p-2: Likewise.
+ * tests/mkdir/p-3: Likewise.
+ * tests/mkdir/p-slashdot: Likewise.
+ * tests/mkdir/p-thru-slink: Likewise.
+ * tests/mkdir/parents: Likewise.
+ * tests/mkdir/perm: Likewise.
+ * tests/mkdir/special-1: Likewise.
+ * tests/mkdir/t-slash: Likewise.
+ * tests/mkdir/writable-under-readonly: Likewise.
+ * tests/mv/Makefile.am: Likewise.
+ * tests/mv/acl: Likewise.
+ * tests/mv/atomic: Likewise.
+ * tests/mv/backup-is-src: Likewise.
+ * tests/mv/childproof: Likewise.
+ * tests/mv/diag: Likewise.
+ * tests/mv/dir-file: Likewise.
+ * tests/mv/dir2dir: Likewise.
+ * tests/mv/dup-source: Likewise.
+ * tests/mv/force: Likewise.
+ * tests/mv/hard-2: Likewise.
+ * tests/mv/hard-3: Likewise.
+ * tests/mv/hard-4: Likewise.
+ * tests/mv/hard-link-1: Likewise.
+ * tests/mv/i-1: Likewise.
+ * tests/mv/i-2: Likewise.
+ * tests/mv/i-3: Likewise.
+ * tests/mv/i-4: Likewise.
+ * tests/mv/i-link-no: Likewise.
+ * tests/mv/into-self: Likewise.
+ * tests/mv/into-self-2: Likewise.
+ * tests/mv/into-self-3: Likewise.
+ * tests/mv/into-self-4: Likewise.
+ * tests/mv/leak-fd: Likewise.
+ * tests/mv/mv-special-1: Likewise.
+ * tests/mv/no-target-dir: Likewise.
+ * tests/mv/part-fail: Likewise.
+ * tests/mv/part-hardlink: Likewise.
+ * tests/mv/part-rename: Likewise.
+ * tests/mv/part-symlink: Likewise.
+ * tests/mv/partition-perm: Likewise.
+ * tests/mv/perm-1: Likewise.
+ * tests/mv/reply-no: Likewise.
+ * tests/mv/setup: Likewise.
+ * tests/mv/to-symlink: Likewise.
+ * tests/mv/trailing-slash: Likewise.
+ * tests/mv/update: Likewise.
+ * tests/mv/vfat: Likewise.
+ * tests/od/od-N: Likewise.
+ * tests/od/x8: Likewise.
+ * tests/pr/Makefile.am: Likewise.
+ * tests/pr/Test.pm: Likewise.
+ * tests/readlink/can-e: Likewise.
+ * tests/readlink/can-f: Likewise.
+ * tests/readlink/can-m: Likewise.
+ * tests/readlink/rl-1: Likewise.
+ * tests/rm/Makefile.am: Likewise.
+ * tests/rm/cycle: Likewise.
+ * tests/rm/dangling-symlink: Likewise.
+ * tests/rm/deep-1: Likewise.
+ * tests/rm/dir-no-w: Likewise.
+ * tests/rm/dir-nonrecur: Likewise.
+ * tests/rm/dot-rel: Likewise.
+ * tests/rm/empty-inacc: Likewise.
+ * tests/rm/empty-name: Likewise.
+ * tests/rm/f-1: Likewise.
+ * tests/rm/fail-2eperm: Likewise.
+ * tests/rm/fail-eperm: Likewise.
+ * tests/rm/hash: Likewise.
+ * tests/rm/i-1: Likewise.
+ * tests/rm/i-no-r: Likewise.
+ * tests/rm/inaccessible: Likewise.
+ * tests/rm/interactive-always: Likewise.
+ * tests/rm/interactive-once: Likewise.
+ * tests/rm/ir-1: Likewise.
+ * tests/rm/isatty: Likewise.
+ * tests/rm/no-give-up: Likewise.
+ * tests/rm/r-1: Likewise.
+ * tests/rm/r-2: Likewise.
+ * tests/rm/r-3: Likewise.
+ * tests/rm/rm1: Likewise.
+ * tests/rm/rm2: Likewise.
+ * tests/rm/rm3: Likewise.
+ * tests/rm/rm4: Likewise.
+ * tests/rm/rm5: Likewise.
+ * tests/rm/sunos-1: Likewise.
+ * tests/rm/unread2: Likewise.
+ * tests/rm/unread3: Likewise.
+ * tests/rm/unreadable: Likewise.
+ * tests/rmdir/fail-perm: Likewise.
+ * tests/rmdir/ignore: Likewise.
+ * tests/rmdir/t-slash: Likewise.
+ * tests/seq/basic: Likewise.
+ * tests/sha1sum/basic-1: Likewise.
+ * tests/sha1sum/sample-vec: Likewise.
+ * tests/shred/exact: Likewise.
+ * tests/shred/remove: Likewise.
+ * tests/sort/Makefile.am: Likewise.
+ * tests/sort/Test.pm: Likewise.
+ * tests/sort-time/Makefile: Likewise.
+ * tests/sort-time/README: Likewise.
+ * tests/sort-time/rand-gen: Likewise.
+ * tests/stty/basic-1: Likewise.
+ * tests/stty/row-col-1: Likewise.
+ * tests/sum/basic-1: Likewise.
+ * tests/sum/sysv: Likewise.
+ * tests/tac/Makefile.am: Likewise.
+ * tests/tac/Test.pm: Likewise.
+ * tests/tail/Makefile.am: Likewise.
+ * tests/tail/Test.pm: Likewise.
+ * tests/tail-2/Makefile.am: Likewise.
+ * tests/tail-2/append-only: Likewise.
+ * tests/tail-2/assert: Likewise.
+ * tests/tail-2/assert-2: Likewise.
+ * tests/tail-2/big-4gb: Likewise.
+ * tests/tail-2/fflush: Likewise.
+ * tests/tail-2/infloop-1: Likewise.
+ * tests/tail-2/proc-ksyms: Likewise.
+ * tests/tail-2/start-middle: Likewise.
+ * tests/tail-2/tail-n0f: Likewise.
+ * tests/tee/basic: Likewise.
+ * tests/tee/dash: Likewise.
+ * tests/test/Makefile.am: Likewise.
+ * tests/test/Test.pm: Likewise.
+ * tests/touch/Makefile.am: Likewise.
+ * tests/touch/dangling-symlink: Likewise.
+ * tests/touch/empty-file: Likewise.
+ * tests/touch/fail-diag: Likewise.
+ * tests/touch/fifo: Likewise.
+ * tests/touch/no-create-missing: Likewise.
+ * tests/touch/no-rights: Likewise.
+ * tests/touch/not-owner: Likewise.
+ * tests/touch/obsolescent: Likewise.
+ * tests/touch/read-only: Likewise.
+ * tests/touch/relative: Likewise.
+ * tests/tr/Makefile.am: Likewise.
+ * tests/tr/Test.pm: Likewise.
+ * tests/tr/failures: Likewise.
+ * tests/tsort/basic-1: Likewise.
+ * tests/unexpand/basic-1: Likewise.
+ * tests/uniq/Makefile.am: Likewise.
+ * tests/uniq/Test.pm: Likewise.
+ * tests/wc/Makefile.am: Likewise.
+ * tests/wc/Test.pm: Likewise.
+
2006-08-17 Jim Meyering <jim@meyering.net>
ls -CF would misalign columns in some cases.
@@ -2230,3 +2568,12 @@
* configure.ac: Use 6.0-cvs as the version string.
* NEWS: Adjust accordingly.
+
+
+ -----
+
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/ChangeLog-2005 b/ChangeLog-2005
index ec0b23b5e..4ec81dc42 100644
--- a/ChangeLog-2005
+++ b/ChangeLog-2005
@@ -11000,3 +11000,12 @@
textutils, and sh-utils.
* Makefile.am: Likewise.
* src/Makefile.am: Likewise.
+
+
+ -----
+
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/Makefile.am b/Makefile.am
index 8093ebe41..ace9c54d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
+# Make coreutils. -*-Makefile-*-
+
+# Copyright (C) 1990, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+# 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
diff --git a/NEWS b/NEWS
index 7e06c4946..6882f75d6 100644
--- a/NEWS
+++ b/NEWS
@@ -1590,3 +1590,15 @@ packages, see ./old/*/NEWS.
This package began as the union of the following:
textutils-2.1, fileutils-4.1.11, sh-utils-2.0.15.
+
+========================================================================
+
+Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/README b/README
index c8d6d3987..196cc7114 100644
--- a/README
+++ b/README
@@ -172,3 +172,16 @@ http://www.gnu.org/prep/standards_toc.html.
Mail suggestions and bug reports for these programs to
the address on the last line of --help output.
+
+
+========================================================================
+
+Copyright (C) 1998, 2002, 2003, 2004, 2005, 2006 Free Software
+Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/README-valgrind b/README-valgrind
index ae547df25..5d8a8a36a 100644
--- a/README-valgrind
+++ b/README-valgrind
@@ -1,4 +1,22 @@
#! /bin/bash
+# Convert this package for use with valgrind.
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# Convert Makefile.am files:
# find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
diff --git a/TODO b/TODO
index 02c7a07bc..8cc278be4 100644
--- a/TODO
+++ b/TODO
@@ -173,3 +173,22 @@ Remove all uses of the `register' keyword
pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
ls.c: use gettime rather than clock_gettime, gettimeofday, time
+
+-----
+
+Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/announce-gen b/announce-gen
index 34ce114bd..8a30566e0 100755
--- a/announce-gen
+++ b/announce-gen
@@ -1,12 +1,29 @@
#!/usr/bin/perl -w
# Generate an announcement message.
+
+# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
use strict;
use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
-(my $VERSION = '$Revision: 1.24 $ ') =~ tr/[0-9].//cd;
+(my $VERSION = '$Revision: 1.25 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog
index 5b67a0989..5e3f8a1fa 100644
--- a/build-aux/ChangeLog
+++ b/build-aux/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * vc-list-files: Likewise.
+ * mkinstalldirs: Remove; no longer needed.
+
2006-08-09 Paul Eggert <eggert@cs.ucla.edu>
* texinfo.tex: Update from gnulib.
@@ -194,3 +200,13 @@
* config.guess (main): Don't use `head -1'; it's no longer portable.
Use `sed 1q' instead.
+
+
+ -----
+
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index c7c4dbdaf..2fcc94734 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -1,5 +1,24 @@
#!/bin/sh
# List the specified version-controlled files.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# List the specified version-controlled files.
# With no argument, list them all.
# This script must be run solely from the top of a $srcdir build directory.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 1e17c8ed1..68a88e70b 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,16 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * Makefile.am: Likewise.
+ * getdate.texi: Likewise.
+ * perm.texi: Likewise.
+ * getdate.texi: Update to version 1.2 of the GNU FDL.
+ * coreutils.texi: Likewise.
+ (Copying This Manual): Renamed from GNU Free Documentation License.
+ Now an appendix. Include fdl.texi rather than doclicense.texi.
+ * fdl.tex: Renamed from doclicense.texi. Latest version from FSF.
+ * perm.texi: Add copyright notice.
+
2006-08-15 Paul Eggert <eggert@cs.ucla.edu>
* coreutils.texi (df invocation): df exits nonzero if it outputs
@@ -1812,3 +1825,13 @@
(DISABLED_constants.texi): New rule -- disabled for now.
This directory is now shared by fileutils, textutils, and sh-utils.
+
+
+ -----
+
+ Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index ac5b400bf..28ac5d2fb 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
+# Make coreutils documentation. -*-Makefile-*-
+
+# Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2005,
+# 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
info_TEXINFOS = coreutils.texi
EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 12215c3c1..28c92b908 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -136,7 +136,7 @@ Copyright @copyright{} 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2004,
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
+under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
@@ -197,7 +197,7 @@ Free Documentation License''.
* File permissions:: Access modes.
* Date input formats:: Specifying date strings.
* Opening the software toolbox:: The software tools philosophy.
-* GNU Free Documentation License:: The license for this documentation.
+* Copying This Manual:: License for copying this manual.
* Index:: General index.
@detailmenu
@@ -462,9 +462,9 @@ Opening the software toolbox
* The uniq command:: The @command{uniq} command
* Putting the tools together:: Putting the tools together
-GNU Free Documentation License
+Copying This Manual
-* How to use this License for your documents::
+* GNU Free Documentation License:: License for copying this manual.
@end detailmenu
@end menu
@@ -14457,7 +14457,14 @@ philosophy, these books are unparalleled, and I recommend them highly.
Acknowledgment: I would like to express my gratitude to Brian Kernighan
of Bell Labs, the original Software Toolsmith, for reviewing this column.
-@include doclicense.texi
+@node Copying This Manual
+@appendix Copying This Manual
+
+@menu
+* GNU Free Documentation License:: License for copying this manual.
+@end menu
+
+@include fdl.texi
@node Index
@unnumbered Index
diff --git a/doc/doclicense.texi b/doc/fdl.texi
index a6f1ea893..fe78df8d5 100644
--- a/doc/doclicense.texi
+++ b/doc/fdl.texi
@@ -1,33 +1,29 @@
-@c -*-texinfo-*-
+
@node GNU Free Documentation License
-@appendix GNU Free Documentation License
-@center Version 1.1, March 2000
-@ifnottex
-@menu
-* How to use this License for your documents::
-@end menu
-@end ifnottex
+@appendixsec GNU Free Documentation License
+
+@cindex FDL, GNU Free Documentation License
+@center Version 1.2, November 2002
+
@display
-Copyright (C) 2000 Free Software Foundation, Inc.
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
-@iftex
-@sp1
-@end iftex
+
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
-written document ``free'' in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
@@ -41,62 +37,73 @@ software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
-@iftex
-@sp1
-@end iftex
+
@item
APPLICABILITY AND DEFINITIONS
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The ``Document'', below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as ``you''.
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
-A ``Secondary Section'' is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
+general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not ``Transparent'' is called ``Opaque''.
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
@@ -104,9 +111,22 @@ this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
-@iftex
-@sp1
-@end iftex
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
@item
VERBATIM COPYING
@@ -122,15 +142,14 @@ number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
-@iftex
-@sp1
-@end iftex
+
@item
COPYING IN QUANTITY
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
@@ -148,23 +167,20 @@ pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
-@iftex
-@sp1
-@end iftex
+
@item
MODIFICATIONS
@@ -175,54 +191,85 @@ Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
-A. Use in the Title Page (and on the covers, if any) a title distinct
- from that of the Document, and from those of previous versions
- (which should, if there were any, be listed in the History section
- of the Document). You may use the same title as a previous version
- if the original publisher of that version gives permission.@*
-B. List on the Title Page, as authors, one or more persons or entities
- responsible for authorship of the modifications in the Modified
- Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).@*
-C. State on the Title page the name of the publisher of the
- Modified Version, as the publisher.@*
-D. Preserve all the copyright notices of the Document.@*
-E. Add an appropriate copyright notice for your modifications
- adjacent to the other copyright notices.@*
-F. Include, immediately after the copyright notices, a license notice
- giving the public permission to use the Modified Version under the
- terms of this License, in the form shown in the Addendum below.@*
-G. Preserve in that license notice the full lists of Invariant Sections
- and required Cover Texts given in the Document's license notice.@*
-H. Include an unaltered copy of this License.@*
-I. Preserve the section entitled ``History'', and its title, and add to
- it an item stating at least the title, year, new authors, and
- publisher of the Modified Version as given on the Title Page. If
- there is no section entitled ``History'' in the Document, create one
- stating the title, year, authors, and publisher of the Document as
- given on its Title Page, then add an item describing the Modified
- Version as stated in the previous sentence.@*
-J. Preserve the network location, if any, given in the Document for
- public access to a Transparent copy of the Document, and likewise
- the network locations given in the Document for previous versions
- it was based on. These may be placed in the ``History'' section.
- You may omit a network location for a work that was published at
- least four years before the Document itself, or if the original
- publisher of the version it refers to gives permission.@*
-K. In any section entitled ``Acknowledgements'' or ``Dedications'',
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
- and/or dedications given therein.@*
-L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section titles.@*
-M. Delete any section entitled ``Endorsements''. Such a section
- may not be included in the Modified Version.@*
-N. Do not retitle any existing section as ``Endorsements''
- or to conflict in title with any Invariant Section.@*
-@iftex
-@sp1
-@end iftex
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
@@ -230,9 +277,9 @@ of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
-You may add a section entitled ``Endorsements'', provided it contains
+You may add a section Entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
+parties---for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
@@ -249,9 +296,7 @@ permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
-@iftex
-@sp1
-@end iftex
+
@item
COMBINING DOCUMENTS
@@ -260,7 +305,7 @@ License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
-license notice.
+license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
@@ -271,14 +316,12 @@ author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
-In the combination, you must combine any sections entitled ``History''
-in the various original documents, forming one section entitled
-``History''; likewise combine any sections entitled ``Acknowledgements'',
-and any sections entitled ``Dedications''. You must delete all sections
-entitled ``Endorsements.''
-@iftex
-@sp1
-@end iftex
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
@item
COLLECTIONS OF DOCUMENTS
@@ -292,29 +335,27 @@ You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
-@iftex
-@sp1
-@end iftex
+
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an ``aggregate'', and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-@iftex
-@sp1
-@end iftex
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
@item
TRANSLATION
@@ -324,13 +365,18 @@ Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-@iftex
-@sp1
-@end iftex
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
@item
TERMINATION
@@ -341,9 +387,7 @@ automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
-@iftex
-@sp1
-@end iftex
+
@item
FUTURE REVISIONS OF THIS LICENSE
@@ -351,7 +395,7 @@ The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
-http://www.gnu.org/copyleft/.
+@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
@@ -361,11 +405,10 @@ of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation.
-
@end enumerate
-@node How to use this License for your documents
-@unnumberedsec ADDENDUM: How to use this License for your documents
+@page
+@appendixsubsec ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
@@ -373,23 +416,37 @@ license notices just after the title page:
@smallexample
@group
-
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
+ under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
- with the Invariant Sections being @var{list their titles}, with the
- Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
- A copy of the license is included in the section entitled ``GNU
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
-If you have no Invariant Sections, write ``with no Invariant Sections''
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write ``no Front-Cover Texts'' instead of
-``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with...Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/getdate.texi b/doc/getdate.texi
index 919c2990d..eae4526b4 100644
--- a/doc/getdate.texi
+++ b/doc/getdate.texi
@@ -4,7 +4,7 @@
@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
-@c under the terms of the GNU Free Documentation License, Version 1.1 or
+@c under the terms of the GNU Free Documentation License, Version 1.2 or
@c any later version published by the Free Software Foundation; with no
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
@c Texts. A copy of the license is included in the ``GNU Free
diff --git a/doc/perm.texi b/doc/perm.texi
index f5190730e..c74bf119b 100644
--- a/doc/perm.texi
+++ b/doc/perm.texi
@@ -1,3 +1,15 @@
+@c File mode bits
+
+@c Copyright (C) 1994, 1996, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+@c Free Software Foundation, Inc.
+
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.2 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+@c Texts. A copy of the license is included in the ``GNU Free
+@c Documentation License'' file as part of this distribution.
+
Each file has a set of @dfn{file mode bits} that control the kinds of
access that users have to that file. They can be represented either in
symbolic form or as an octal number.
diff --git a/lib/.gdb-history b/lib/.gdb-history
index ee1c44466..7a3202303 100644
--- a/lib/.gdb-history
+++ b/lib/.gdb-history
@@ -1,3 +1,22 @@
+# GDB history for debugging coreutils.
+#
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
r 206.65.212.10
b main
r
@@ -9,7 +28,7 @@ p addr
p he->h_name
n
q
-b canon_host
+b canon_host
r 206.65.212.10
n
p he
@@ -103,7 +122,7 @@ p *old_vec@10
p *old_vec@13
b hash_insert_item
r
-b hash_insert_item_at
+b hash_insert_item_at
r
n
p fail
@@ -111,7 +130,7 @@ p *(ht->vec)@13
p *(ht->ht_vec)@13
p ((struct item*)(ht->ht_vec)[10])->key
b hash_delete_item
-b hash_delete_item_at
+b hash_delete_item_at
c
n
p slot
@@ -147,7 +166,7 @@ p *old_vec@13
p &dummy
q
r 444444444444 44444444444
-b human_readable
+b human_readable
r
n
q
@@ -166,7 +185,7 @@ p b
r 343434343 343434343
c
q
-b posixtime
+b posixtime
r
n
s
@@ -187,7 +206,7 @@ q
complete b user
complete b user
complete b pars
-b parse_user_spec
+b parse_user_spec
r a.b
n
n
@@ -291,7 +310,7 @@ p allocated
n 20
n
complete p alloca
-p allocated
+p allocated
p length
n
p maxlen
@@ -303,7 +322,7 @@ n
p result
q
complete b vasnp
-b vasnprintf
+b vasnprintf
r
n 30
n
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 00c19a3c7..56e7a4adf 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,18 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * .gdb-history: Likewise.
+ * TODO: Likewise.
+ * __fpending.h: Likewise.
+ * fdopendir-glibc.c: Likewise.
+ * fprintftime.h: Likewise.
+ * root-dev-ino.h: Likewise.
+ * search_.h: Likewise.
+ * t-chdir-long: Likewise.
+ * t-fpending.c: Likewise.
+ * savedir.c: Use (C) in copyright notice.
+ * savedir.h: Likewise.
+
2006-08-16 Paul Eggert <eggert@cs.ucla.edu>
* memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
@@ -8465,3 +8480,13 @@
* quotearg.c (quotearg_buffer_restyled): Do not quote
alert, backslash, formfeed, and vertical tab unnecessarily in
shell quoting style.
+
+
+ -----
+
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
+ Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/lib/TODO b/lib/TODO
index 4b3fe850e..4da5d0caf 100644
--- a/lib/TODO
+++ b/lib/TODO
@@ -30,3 +30,11 @@ Mention fragmentation.
assert (bucket_limit - bucket == n_buckets) ?
remove.c: s/done/successful or ok
+
+
+-----
+Copyright (C) 1998 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without
+modification, are permitted provided the copyright notice
+and this notice are preserved.
diff --git a/lib/__fpending.h b/lib/__fpending.h
index 36a842ed5..3c9be1e08 100644
--- a/lib/__fpending.h
+++ b/lib/__fpending.h
@@ -1,3 +1,23 @@
+/* Declare __fpending.
+
+ Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Jim Meyering. */
+
#include <stddef.h>
#include <stdio.h>
diff --git a/lib/fdopendir-glibc.c b/lib/fdopendir-glibc.c
index 6b66a6f2a..6598dc227 100644
--- a/lib/fdopendir-glibc.c
+++ b/lib/fdopendir-glibc.c
@@ -1,3 +1,21 @@
+/* fdopendir implementation derived from glibc.
+
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
diff --git a/lib/fprintftime.h b/lib/fprintftime.h
index 38fef43f1..e0be5cded 100644
--- a/lib/fprintftime.h
+++ b/lib/fprintftime.h
@@ -1,3 +1,21 @@
+/* Generate time strings directly to the output. */
+
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
#include <stdio.h>
#include <time.h>
diff --git a/lib/root-dev-ino.h b/lib/root-dev-ino.h
index e9eba06b9..ad38f7635 100644
--- a/lib/root-dev-ino.h
+++ b/lib/root-dev-ino.h
@@ -1,3 +1,21 @@
+/* Root device and inode number checking.
+
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
#ifndef ROOT_DEV_INO_H
# define ROOT_DEV_INO_H 1
diff --git a/lib/savedir.c b/lib/savedir.c
index 4b0702480..3c442aa6e 100644
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -1,7 +1,7 @@
/* savedir.c -- save the list of files in a directory in a string
- Copyright 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/savedir.h b/lib/savedir.h
index 7809d2392..5b7bef971 100644
--- a/lib/savedir.h
+++ b/lib/savedir.h
@@ -1,6 +1,6 @@
/* Save the list of files in a directory in a string.
- Copyright 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/search_.h b/lib/search_.h
index 78e3980ec..802b25d79 100644
--- a/lib/search_.h
+++ b/lib/search_.h
@@ -1,3 +1,22 @@
+/* Tree search.
+
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003 Free
+ Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
/* For use with hsearch(3). */
#ifndef __COMPAR_FN_T
# define __COMPAR_FN_T
diff --git a/lib/t-chdir-long b/lib/t-chdir-long
index 1f9a83cfb..37dd7181a 100755
--- a/lib/t-chdir-long
+++ b/lib/t-chdir-long
@@ -1,5 +1,24 @@
#!/bin/sh
# Exercise chdir-long's sample main program.
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# FIXME: add traps and choose top level names so that
# temporary directories are easier to remove.
# FIXME: don't clobber a.out
diff --git a/lib/t-fpending.c b/lib/t-fpending.c
index 10335cdd0..74ecae1bd 100644
--- a/lib/t-fpending.c
+++ b/lib/t-fpending.c
@@ -1,4 +1,22 @@
-/* Ensure that __fpending works. */
+/* Ensure that __fpending works.
+
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Jim Meyering. */
#include <config.h>
#include <stdio.h>
diff --git a/m4/ChangeLog b/m4/ChangeLog
index d225958c7..979eed295 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * check-decl.m4: Likewise.
+
2006-08-15 Jim Meyering <jim@meyering.net>
* openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
@@ -4749,3 +4754,13 @@
* inttypes_h.m4: New file.
* uintmax_t.m4: New file.
* Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
+
+
+ -----
+
+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index 519b23ac3..0c714edc3 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -1,4 +1,13 @@
#serial 22
+# Check declarations for this package.
+
+dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+dnl Free Software Foundation, Inc.
+
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
diff --git a/man/Makefile.am b/man/Makefile.am
index 7b4f9d24b..c0675944b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
+# Make coreutils man pages. -*-Makefile-*-
+
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
dist_man_MANS = \
base64.1 basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \
cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \
diff --git a/man/chmod.x b/man/chmod.x
index c504872a3..9a73cd535 100644
--- a/man/chmod.x
+++ b/man/chmod.x
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
[NAME]
chmod \- change file mode bits
[DESCRIPTION]
diff --git a/man/chown.x b/man/chown.x
index 83a949f28..57ad05a01 100644
--- a/man/chown.x
+++ b/man/chown.x
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
[NAME]
chown \- change file owner and group
[DESCRIPTION]
diff --git a/man/df.x b/man/df.x
index b7c31a4f1..6a8b3680e 100644
--- a/man/df.x
+++ b/man/df.x
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
[NAME]
df \- report file system disk space usage
[DESCRIPTION]
diff --git a/man/du.x b/man/du.x
index 8eeedaef7..b17036974 100644
--- a/man/du.x
+++ b/man/du.x
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
[NAME]
du \- estimate file space usage
[DESCRIPTION]
diff --git a/man/rm.x b/man/rm.x
index 79a2bdc21..422ad79d0 100644
--- a/man/rm.x
+++ b/man/rm.x
@@ -1,3 +1,9 @@
+'\" Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software
+'\" Foundation, Inc.
+'\"
+'\" This is free software. You may redistribute copies of it under the terms
+'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
[NAME]
rm \- remove files or directories
[DESCRIPTION]
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index 5f12d1ca3..971ce55cb 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * ChangeLog-1997: Likewise.
+ * NEWS: Likewise.
+
2002-07-28 Jim Meyering <meyering@lucent.com>
* Version 4.1.12.
@@ -8380,3 +8386,13 @@
* src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
only once and never free it.
+
+
+ -----
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/old/fileutils/ChangeLog-1997 b/old/fileutils/ChangeLog-1997
index 65d0e90b5..72655cc4e 100644
--- a/old/fileutils/ChangeLog-1997
+++ b/old/fileutils/ChangeLog-1997
@@ -6154,3 +6154,13 @@ Thu Feb 8 21:25:40 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
Mon Feb 5 17:29:20 1990 David J. MacKenzie (djm at albert.ai.mit.edu)
* Version 1.0 released.
+
+
+ -----
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/old/fileutils/NEWS b/old/fileutils/NEWS
index b89ca311d..5adff8fa9 100644
--- a/old/fileutils/NEWS
+++ b/old/fileutils/NEWS
@@ -746,3 +746,15 @@ Major changes in release 3.3:
* ls sped up by not reading symlink contents unnecessarily
* du doesn't die on POSIX systems when the root filesystem is NFS mounted
* cp and mv report chown Permission denied errors when run by root
+
+========================================================================
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/old/sh-utils/ChangeLog b/old/sh-utils/ChangeLog
index 9005a62cb..f95975de0 100644
--- a/old/sh-utils/ChangeLog
+++ b/old/sh-utils/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * ChangeLog.0: Likewise.
+ * NEWS: Likewise.
+
2002-08-08 Jim Meyering <meyering@lucent.com>
* Version 2.0.15.
@@ -4848,3 +4854,13 @@ Thu Nov 17 23:47:26 1994 Jim Meyering (meyering@comco.com)
(list_entries_users): Sort the user names. Reported by
Michael I Bushnell.
Topologically sort the functions and remove fwd declarations.
+
+
+ -----
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2006
+ Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/old/sh-utils/ChangeLog.0 b/old/sh-utils/ChangeLog.0
index 0408ec622..77705c89e 100644
--- a/old/sh-utils/ChangeLog.0
+++ b/old/sh-utils/ChangeLog.0
@@ -1702,6 +1702,16 @@ Sat Oct 28 13:20:43 1989 David J. MacKenzie (djm at spiff)
(program_name, long_options): New variables.
(main): Support long options.
(usage): Add long options summary to message.
+
+
+ -----
+
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
Local Variables:
mode: indented-text
diff --git a/old/sh-utils/NEWS b/old/sh-utils/NEWS
index 7da709d9a..d9dc3b521 100644
--- a/old/sh-utils/NEWS
+++ b/old/sh-utils/NEWS
@@ -270,3 +270,15 @@ Major changes in release 1.7:
* printf catches numeric conversion errors with an ANSI C library
* stty nl and -nl were backwards
* date can format an arbitrary date without setting it
+
+========================================================================
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/old/textutils/ChangeLog b/old/textutils/ChangeLog
index 12ceb7366..cc3331e97 100644
--- a/old/textutils/ChangeLog
+++ b/old/textutils/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * ChangeLog: Add copyright notice.
+ * NEWS: Likewise.
+
2002-07-29 Jim Meyering <meyering@lucent.com>
* Version 2.1.
@@ -8736,3 +8741,13 @@ Sat Dec 16 15:15:50 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
(error): Print to stderr, not stdout.
(xmalloc, xrealloc): Return char * instead of int.
Returning 0 is ok if 0 bytes requested (ANSI C).
+
+
+ -----
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/old/textutils/NEWS b/old/textutils/NEWS
index 92b209175..da8d1a5bb 100644
--- a/old/textutils/NEWS
+++ b/old/textutils/NEWS
@@ -458,3 +458,15 @@ Major changes in release 1.4:
* tr x '' fails gracefully
* default sum output format is BSD compatible
* paste -d '' works
+
+========================================================================
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2006 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the ``GNU Free
+Documentation License'' file as part of this distribution.
diff --git a/po/ChangeLog b/po/ChangeLog
index 2b9526210..92a9e975c 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * po/ChangeLog: Add copyright notice.
+ * po/Makevars: Likewise.
+
2006-08-10 Paul Eggert <eggert@cs.ucla.edu>
* Makevars (XGETTEXT_OPTIONS): Add pass-c-format flags for
@@ -182,3 +187,13 @@
2002-09-02 Jim Meyering <jim@meyering.net>
* LINGUAS: Add lg (Luganda).
+
+
+ -----
+
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
diff --git a/po/Makevars b/po/Makevars
index 91af305dd..8429e9c7c 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -1,5 +1,22 @@
# Makefile variables for PO directory in any package using GNU gettext.
+## Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
diff --git a/src/dircolors.hin b/src/dircolors.hin
index 9a2026bde..737ab0358 100644
--- a/src/dircolors.hin
+++ b/src/dircolors.hin
@@ -1,6 +1,11 @@
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
+# Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+# Copying and distribution of this file, with or without modification,
+# are permitted provided the copyright notice and this notice are preserved.
+
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
diff --git a/src/du-tests b/src/du-tests
index 15ea37305..21b586a0c 100755
--- a/src/du-tests
+++ b/src/du-tests
@@ -1,4 +1,21 @@
#!/bin/bash
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
cat - <<\EOF > /dev/null
Invoke e.g., like this
DU1=du-4.5.2 DU2=du ./du-tests
diff --git a/src/extract-magic b/src/extract-magic
index 1259b0e53..2e9e871d3 100644
--- a/src/extract-magic
+++ b/src/extract-magic
@@ -1,10 +1,27 @@
#!/usr/bin/perl -w
# Derive #define directives from specially formatted `case ...:' statements.
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
use strict;
use Getopt::Long;
-(my $VERSION = '$Revision: 1.4 $ ') =~ tr/[0-9].//cd;
+(my $VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
END
diff --git a/src/tac-pipe.c b/src/tac-pipe.c
index 9263df763..d2c6f677b 100644
--- a/src/tac-pipe.c
+++ b/src/tac-pipe.c
@@ -1,3 +1,21 @@
+/* tac from a pipe.
+
+ Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
/* FIXME */
#include <assert.h>
diff --git a/src/uname.c b/src/uname.c
index d47901c9f..0715e07cd 100644
--- a/src/uname.c
+++ b/src/uname.c
@@ -1,6 +1,6 @@
/* uname -- print system information
- Copyright 1989, 1992, 1993, 1996, 1997, 1999, 2000, 2001, 2002,
+ Copyright (C) 1989, 1992, 1993, 1996, 1997, 1999, 2000, 2001, 2002,
2003, 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/src/wheel-gen.pl b/src/wheel-gen.pl
index ec4dd6198..a22583008 100755
--- a/src/wheel-gen.pl
+++ b/src/wheel-gen.pl
@@ -1,4 +1,21 @@
#!/usr/bin/perl -w
+# Generate the spokes of a wheel, for wheel factorization.
+
+# Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0;
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index 1490fb1d3..dd90a300a 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -1,6 +1,24 @@
package Coreutils;
# This is a testing framework.
+# Copyright (C) 1998, 2000, 2001, 2002, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
require 5.003;
use strict;
use vars qw($VERSION @ISA @EXPORT);
@@ -9,7 +27,7 @@ use FileHandle;
use File::Compare qw(compare);
@ISA = qw(Exporter);
-($VERSION = '$Revision: 1.4 $ ') =~ tr/[0-9].//cd;
+($VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
@EXPORT = qw (run_tests);
my $debug = $ENV{DEBUG};
diff --git a/tests/Makefile.am.in b/tests/Makefile.am.in
index 23f2cfaa4..9002cab05 100644
--- a/tests/Makefile.am.in
+++ b/tests/Makefile.am.in
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests. -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
##test-files-end
diff --git a/tests/acl b/tests/acl
index 6d1480dc9..5c958ea31 100644
--- a/tests/acl
+++ b/tests/acl
@@ -1,3 +1,22 @@
+# Test whether acl tests can be done.
+
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
getfacl --version < /dev/null > /dev/null 2>&1 \
&& setfacl --version < /dev/null > /dev/null 2>&1 || {
cat <<EOF 1>&2
diff --git a/tests/chgrp/basic b/tests/chgrp/basic
index d4971194c..21cbe01b4 100755
--- a/tests/chgrp/basic
+++ b/tests/chgrp/basic
@@ -1,6 +1,24 @@
#!/bin/sh
# make sure chgrp is reasonable
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chgrp/deref b/tests/chgrp/deref
index ff215125c..b15d0c380 100755
--- a/tests/chgrp/deref
+++ b/tests/chgrp/deref
@@ -1,6 +1,23 @@
#!/bin/sh
# see if chgrp can change the group of a symlink
+# Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chgrp/no-x b/tests/chgrp/no-x
index e66a57784..d82002c61 100755
--- a/tests/chgrp/no-x
+++ b/tests/chgrp/no-x
@@ -2,6 +2,23 @@
# Make sure chgrp gives the right diagnostic for a readable,
# but inaccessible directory.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chgrp/posix-H b/tests/chgrp/posix-H
index e9736968d..147bb5224 100755
--- a/tests/chgrp/posix-H
+++ b/tests/chgrp/posix-H
@@ -1,6 +1,23 @@
#!/bin/sh
# Test POSIX-mandated -H option.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chgrp/recurse b/tests/chgrp/recurse
index 7cd1648e2..23f040d34 100755
--- a/tests/chgrp/recurse
+++ b/tests/chgrp/recurse
@@ -1,6 +1,23 @@
#!/bin/sh
# ad-hoc tests of chgrp with -R and -H or -L and symlinks
+# Copyright (C) 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chmod/c-option b/tests/chmod/c-option
index ff5d16e2c..0d73ca895 100755
--- a/tests/chmod/c-option
+++ b/tests/chmod/c-option
@@ -1,6 +1,23 @@
#!/bin/sh
# Verify that chmod's --changes (-c) option works.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/equal-x b/tests/chmod/equal-x
index 7b6fb781b..191f6b6df 100755
--- a/tests/chmod/equal-x
+++ b/tests/chmod/equal-x
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "chmod =x" and the like.
+
+# Copyright (C) 1999, 2000, 2002, 2004, 2005 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/chmod/equals b/tests/chmod/equals
index a22017eb6..152c0af3f 100755
--- a/tests/chmod/equals
+++ b/tests/chmod/equals
@@ -3,6 +3,24 @@
# Before fileutils-4.1.2, some of them didn't.
# Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
+# Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/no-x b/tests/chmod/no-x
index bdaeb732a..7e5519e4b 100755
--- a/tests/chmod/no-x
+++ b/tests/chmod/no-x
@@ -2,6 +2,23 @@
# Make sure chmod gives the right diagnostic for a readable,
# but inaccessible directory.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/octal b/tests/chmod/octal
index 74b94238b..e6167c69f 100755
--- a/tests/chmod/octal
+++ b/tests/chmod/octal
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that chmod diagnoses a certain type of invalid mode string
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/setgid b/tests/chmod/setgid
index 67381fe1a..92068b867 100755
--- a/tests/chmod/setgid
+++ b/tests/chmod/setgid
@@ -2,6 +2,23 @@
# Make sure GNU chmod works the same way as those of Solaris, HPUX, AIX
# wrt directories with the setgid bit set.
+# Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/umask-x b/tests/chmod/umask-x
index 6ed95b122..b95d9d588 100755
--- a/tests/chmod/umask-x
+++ b/tests/chmod/umask-x
@@ -1,6 +1,23 @@
#!/bin/sh
# Test that chmod -x file reports an error if the result is executable.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chmod/usage b/tests/chmod/usage
index 31d0c6f97..eef46668d 100755
--- a/tests/chmod/usage
+++ b/tests/chmod/usage
@@ -1,6 +1,23 @@
#!/bin/sh
# Verify that chmod works correctly with odd option combinations.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chmod --version
diff --git a/tests/chown/basic b/tests/chown/basic
index a102fb821..09d86a391 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure chown --from=... works
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chgrp --version
diff --git a/tests/chown/deref b/tests/chown/deref
index 68d36b7b4..2c7facd74 100755
--- a/tests/chown/deref
+++ b/tests/chown/deref
@@ -2,6 +2,23 @@
# For coreutils-5.2.1 and earlier, chown --dereference would skip
# symlinks having owner/group matching the specified owner/group.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chown --version
diff --git a/tests/chown/separator b/tests/chown/separator
index 0c4c59f54..6a52b3015 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure "chown USER:GROUP FILE" works, and similar tests with separators.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
chown --version
diff --git a/tests/cp/Makefile.am b/tests/cp/Makefile.am
index acbb22df9..1a4aa84f4 100644
--- a/tests/cp/Makefile.am
+++ b/tests/cp/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for cp. -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2005, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
diff --git a/tests/cp/acl b/tests/cp/acl
index 3c7274732..5221ee9ac 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -2,6 +2,23 @@
# copy files/directories across file system boundaries
# and make sure acls are preserved appropriately
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../acl
# Make sure we get English translations.
. $srcdir/../lang-default
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1
index b17e61af8..48247ac4b 100755
--- a/tests/cp/backup-1
+++ b/tests/cp/backup-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test cp backup.
+
+# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src
index 7d4c47d64..e0567b8e2 100755
--- a/tests/cp/backup-is-src
+++ b/tests/cp/backup-is-src
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test cp backup to source file.
+
+# Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/cp/cp-HL b/tests/cp/cp-HL
index afe236936..02ebd7c67 100755
--- a/tests/cp/cp-HL
+++ b/tests/cp/cp-HL
@@ -1,5 +1,22 @@
#!/bin/sh
-# test cp's new, -H and -L options
+# test cp's -H and -L options
+
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/cp/cp-deref b/tests/cp/cp-deref
index bfc827737..80085c263 100755
--- a/tests/cp/cp-deref
+++ b/tests/cp/cp-deref
@@ -2,6 +2,23 @@
# cp -RL dir1 dir2' must handle the case in which each of dir1 and dir2
# contain a symlink pointing to some third directory.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup
index d90b87cc9..3dc2c2a7c 100755
--- a/tests/cp/cp-mv-backup
+++ b/tests/cp/cp-mv-backup
@@ -1,6 +1,23 @@
#!/bin/sh
# Test basic --backup functionality for both cp and mv.
+# Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index 8f97cb515..0081d67c2 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -2,6 +2,23 @@
# cp -R --parents dir-specified-with-trailing-slash/ other-dir
# would get a failed assertion.
+# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/cp/deref-slink b/tests/cp/deref-slink
index 641406fa4..1f9eecb36 100755
--- a/tests/cp/deref-slink
+++ b/tests/cp/deref-slink
@@ -2,6 +2,23 @@
# Demonstrate bug when using -d with an existing destination file
# that is a symlink.
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/dir-rm-dest b/tests/cp/dir-rm-dest
index c6c8229e5..da55bf660 100755
--- a/tests/cp/dir-rm-dest
+++ b/tests/cp/dir-rm-dest
@@ -1,6 +1,23 @@
#!/bin/sh
# verify that cp's --remove-destination option works with -R
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/dir-slash b/tests/cp/dir-slash
index 2fc10b230..d34c51ecb 100755
--- a/tests/cp/dir-slash
+++ b/tests/cp/dir-slash
@@ -2,6 +2,23 @@
# Make sure that cp -R DIR1 DIR2 does the right thing
# when DIR1 is written with a trailing slash.
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/dir-vs-file b/tests/cp/dir-vs-file
index b024c213a..ce334fcef 100755
--- a/tests/cp/dir-vs-file
+++ b/tests/cp/dir-vs-file
@@ -1,6 +1,23 @@
#!/bin/sh
# A directory may not replace an existing file.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
index 411173a7c..bf077e05f 100755
--- a/tests/cp/fail-perm
+++ b/tests/cp/fail-perm
@@ -1,5 +1,23 @@
#!/bin/sh
+# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/into-self b/tests/cp/into-self
index 9a6a52851..dcada77f3 100755
--- a/tests/cp/into-self
+++ b/tests/cp/into-self
@@ -1,5 +1,23 @@
#!/bin/sh
# Confirm that copying a directory into itself gets a proper diagnostic.
+
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# In 4.0.35 and earlier, `mkdir dir && cp -R dir dir' would produce this:
# cp: won't create hard link `dir/dir/dir' to directory `'
# Now it gives this:
diff --git a/tests/cp/link b/tests/cp/link
index 84902ba06..a1e1f6a3c 100755
--- a/tests/cp/link
+++ b/tests/cp/link
@@ -2,6 +2,23 @@
# Make sure cp --link -f works when the target exists.
# This failed for 4.0z (due to a bug introduced in that test release).
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/link-no-deref b/tests/cp/link-no-deref
index 75fc7afc4..b1ee5004d 100755
--- a/tests/cp/link-no-deref
+++ b/tests/cp/link-no-deref
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that cp --link --no-dereference works properly
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve
index 6db88249c..8fbeff0d2 100755
--- a/tests/cp/link-preserve
+++ b/tests/cp/link-preserve
@@ -2,6 +2,23 @@
# ensure that `cp -d' preserves hard-links between command line arguments
# ensure that --preserve=links works with -RH and -RL
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1
index a7df22c26..b3c1c3532 100755
--- a/tests/cp/no-deref-link1
+++ b/tests/cp/no-deref-link1
@@ -2,6 +2,23 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
+# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2
index ff0d0692a..90e615df2 100755
--- a/tests/cp/no-deref-link2
+++ b/tests/cp/no-deref-link2
@@ -2,6 +2,23 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
+# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3
index d60d9630b..e93ee7392 100755
--- a/tests/cp/no-deref-link3
+++ b/tests/cp/no-deref-link3
@@ -2,6 +2,23 @@
# FIXME: This test requires ln -s.
# cp from 3.16 fails this test
+# Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/perm b/tests/cp/perm
index 969104525..2499554bc 100755
--- a/tests/cp/perm
+++ b/tests/cp/perm
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure the permission-preserving code in copy.c (mv, cp, install) works.
+# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../very-expensive
if test "$VERBOSE" = yes; then
diff --git a/tests/cp/preserve-2 b/tests/cp/preserve-2
index 003bf78b8..57816d220 100755
--- a/tests/cp/preserve-2
+++ b/tests/cp/preserve-2
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that cp's --preserve=X,Y option is parsed properly
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/r-vs-symlink b/tests/cp/r-vs-symlink
index da50602ad..3869507d6 100755
--- a/tests/cp/r-vs-symlink
+++ b/tests/cp/r-vs-symlink
@@ -1,5 +1,23 @@
#!/bin/sh
# cp -r should not create symlinks. Fixed in fileutils-4.1.5.
+
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Restored old behavior (whereby cp -r preserves symlinks) in 4.1.6,
# though now such usage evokes a warning:
# cp: `slink': WARNING: using -r to copy symbolic links is not portable
diff --git a/tests/cp/same-file b/tests/cp/same-file
index a08c4e3f3..05a0e75c0 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -2,6 +2,24 @@
# Test some of cp's options and how cp handles situations in
# which a naive implementation might overwrite the source file.
+# Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/slink-2-slink b/tests/cp/slink-2-slink
index 3e540fe6b..1d328349f 100755
--- a/tests/cp/slink-2-slink
+++ b/tests/cp/slink-2-slink
@@ -2,6 +2,23 @@
# `test cp --update A B' where A and B are both symlinks that point
# to the same file
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cp/special-bits b/tests/cp/special-bits
index 007ce938c..c3217ff58 100755
--- a/tests/cp/special-bits
+++ b/tests/cp/special-bits
@@ -2,6 +2,23 @@
# make sure `cp -p' preserves special bits
# This works only when run as root.
+# Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# This test would fail due to a bug introduced in 4.0y.
# The bug was fixed in 4.0z.
diff --git a/tests/cp/symlink-slash b/tests/cp/symlink-slash
index f55d49dff..e99dcdfe6 100755
--- a/tests/cp/symlink-slash
+++ b/tests/cp/symlink-slash
@@ -2,6 +2,23 @@
# Make sure that cp -dR dereferences a symlink arg if its name is
# written with a trailing slash.
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/cut/Makefile.am b/tests/cut/Makefile.am
index 525ddac13..1494c4ec9 100644
--- a/tests/cut/Makefile.am
+++ b/tests/cut/Makefile.am
@@ -1,4 +1,21 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for 'cut'. -*-Makefile-*-
+
+# Copyright (C) 1996, 1997, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = cut
diff --git a/tests/cut/Test.pm b/tests/cut/Test.pm
index cc93c1c11..b4cd4e509 100755
--- a/tests/cut/Test.pm
+++ b/tests/cut/Test.pm
@@ -1,3 +1,23 @@
+# Test 'cut'.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2003, 2004 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/dd/misc b/tests/dd/misc
index 53515629d..2db5c5bd7 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -2,6 +2,23 @@
# Ensure dd treats `--' properly.
# Also test some flag values.
+# Copyright (C) 1999, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
tmp_in=dd-in.$$
tmp_in2=dd-in2.$$
tmp_sym=dd-sym.$$
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound
index 42780863b..534d628f9 100755
--- a/tests/dd/not-rewound
+++ b/tests/dd/not-rewound
@@ -2,6 +2,23 @@
# Make sure dd does the right thing when the input file descriptor
# is not rewound.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
dd --version
diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek
index fe68912bd..e6123cfae 100755
--- a/tests/dd/skip-seek
+++ b/tests/dd/skip-seek
@@ -1,5 +1,24 @@
#!/bin/sh
# -*- perl -*-
+# Test dd's skip and seek options.
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2
index fdaf68dc2..bafb7258c 100755
--- a/tests/dd/skip-seek2
+++ b/tests/dd/skip-seek2
@@ -2,6 +2,23 @@
# show how to skip an amount that is smaller than the nominal block size.
# There's a more realistic example in the documentation.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
dd --version
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync
index 5050db675..73c2b5289 100755
--- a/tests/dd/unblock-sync
+++ b/tests/dd/unblock-sync
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that dd conv=unblock,sync works.
+# Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
dd --version
diff --git a/tests/dircolors/simple b/tests/dircolors/simple
index 563857ce3..71ccfd174 100755
--- a/tests/dircolors/simple
+++ b/tests/dircolors/simple
@@ -1,4 +1,22 @@
#!/bin/sh
+# Simple dircolors tests.
+
+# Copyright (C) 1998, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/du/2g b/tests/du/2g
index 4d3d8fdbd..4f0006df7 100755
--- a/tests/du/2g
+++ b/tests/du/2g
@@ -3,6 +3,23 @@
# Before coreutils-5.93, on systems with a signed, 32-bit stat.st_blocks
# one of du's computations would overflow.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/8gb b/tests/du/8gb
index c777d6663..036cb8699 100755
--- a/tests/du/8gb
+++ b/tests/du/8gb
@@ -2,6 +2,23 @@
# Ensure that du does not rely on narrow types like size_t for
# file sizes or sums.
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/Makefile.am b/tests/du/Makefile.am
index 2cfe5ff19..e24b85c5b 100644
--- a/tests/du/Makefile.am
+++ b/tests/du/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "du". -*-Makefile-*-
+
+# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.4 gnits
TESTS = \
diff --git a/tests/du/basic b/tests/du/basic
index 0af453356..0427068f5 100755
--- a/tests/du/basic
+++ b/tests/du/basic
@@ -1,6 +1,23 @@
#!/bin/sh
# Compare actual numbers from du, assuming block size matches mine.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/deref b/tests/du/deref
index 0ff12ea93..8a3db87fe 100755
--- a/tests/du/deref
+++ b/tests/du/deref
@@ -2,6 +2,23 @@
# prior to coreutils-4.5.3, du -D didn't work in some cases
# Based on an example from Andreas Schwab and/or Michal Svec.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/deref-args b/tests/du/deref-args
index 05a1448c6..91ce99ff1 100755
--- a/tests/du/deref-args
+++ b/tests/du/deref-args
@@ -2,6 +2,23 @@
# Ensure that --dereference-args (-D) gives reasonable names.
# This test would fail for coreutils-5.0.91.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/exclude b/tests/du/exclude
index de24ba19b..bf36c4bc3 100755
--- a/tests/du/exclude
+++ b/tests/du/exclude
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure du's --exclude option works
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/fd-leak b/tests/du/fd-leak
index 2336ed891..af4482cb4 100755
--- a/tests/du/fd-leak
+++ b/tests/du/fd-leak
@@ -1,6 +1,23 @@
#!/bin/sh
# check for file descriptor leak
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/files0-from b/tests/du/files0-from
index efe62f632..fdcb59575 100755
--- a/tests/du/files0-from
+++ b/tests/du/files0-from
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise du's --files0-from option.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/du/hard-link b/tests/du/hard-link
index 3702e8d54..920ae52f1 100755
--- a/tests/du/hard-link
+++ b/tests/du/hard-link
@@ -3,6 +3,23 @@
# Likewise for excluded directories.
# Ensure that hard links _are_ listed twice when using --count-links.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd
index c344d6d3e..e50534cc7 100755
--- a/tests/du/inaccessible-cwd
+++ b/tests/du/inaccessible-cwd
@@ -1,6 +1,24 @@
#!/bin/sh
# Ensure that even when run from an inaccessible directory, du can still
# operate on accessible directories elsewhere.
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Before the switch to an fts-based implementation in coreutils 5.0.92,
# this test would fail.
diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable
index 2ae7ed1d9..5a84c2e34 100755
--- a/tests/du/long-from-unreadable
+++ b/tests/du/long-from-unreadable
@@ -1,4 +1,23 @@
#!/bin/sh
+# Show fts fails on old-fashioned systems.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Show that fts (hence du, chmod, chgrp, chown) fails when all of the
# following are true:
# - `.' is not readable
diff --git a/tests/du/long-sloop b/tests/du/long-sloop
index 2dee47be9..69ce0e0c6 100755
--- a/tests/du/long-sloop
+++ b/tests/du/long-sloop
@@ -3,6 +3,23 @@
# Show that du fails with ELOOP (Too many levels of symbolic links)
# when it encounters that condition.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/no-deref b/tests/du/no-deref
index c8ef95ba1..db0f30c32 100755
--- a/tests/du/no-deref
+++ b/tests/du/no-deref
@@ -1,5 +1,22 @@
#!/bin/sh
-# Ensure that by defualt, du doesn't dereference symlinks given on command line.
+# Ensure that by default, du doesn't dereference command-line symlinks.
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/du/no-x b/tests/du/no-x
index 7cd2f182b..75b4e4f63 100755
--- a/tests/du/no-x
+++ b/tests/du/no-x
@@ -2,6 +2,23 @@
# Make sure du gives the right diagnostic for a readable,
# but inaccessible directory.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/restore-wd b/tests/du/restore-wd
index 927265af5..c7b623306 100755
--- a/tests/du/restore-wd
+++ b/tests/du/restore-wd
@@ -2,6 +2,23 @@
# due to a bug in glibc's ftw.c, in some cases, nftw w/FTW_CHDIR
# would not restore the working directory.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/slash b/tests/du/slash
index 423fb3899..636e961c6 100755
--- a/tests/du/slash
+++ b/tests/du/slash
@@ -1,6 +1,23 @@
#!/bin/sh
# `du /' would omit the `/' on the last line.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/slink b/tests/du/slink
index 4625aa053..74f8abf9e 100755
--- a/tests/du/slink
+++ b/tests/du/slink
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that the size of a long-named-symlink is > 0.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash
index 41a9b53c0..a9785c7db 100755
--- a/tests/du/trailing-slash
+++ b/tests/du/trailing-slash
@@ -1,6 +1,24 @@
#!/bin/sh
# Ensure that du works properly for an argument that refers to a
# symbolic link, and that is specified with a trailing slash.
+
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Before coreutils-4.5.3, it would remove a single trailing slash.
if test "$VERBOSE" = yes; then
diff --git a/tests/du/two-args b/tests/du/two-args
index 5e9649933..45f911c4c 100755
--- a/tests/du/two-args
+++ b/tests/du/two-args
@@ -2,6 +2,23 @@
# Make sure `du d/1 d/2' works.
# That command failed with du from fileutils-4.0q.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
du --version
diff --git a/tests/envvar-check b/tests/envvar-check
index 8d1d3b903..357a6176a 100644
--- a/tests/envvar-check
+++ b/tests/envvar-check
@@ -1,4 +1,24 @@
# -*- sh -*-
+# Check environment variables for sane values while testing.
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
else
diff --git a/tests/expensive b/tests/expensive
index d1bbc5a70..cc3f40d50 100644
--- a/tests/expensive
+++ b/tests/expensive
@@ -1,3 +1,22 @@
+# Is a test expensive?
+
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$RUN_EXPENSIVE_TESTS" != yes; then
cat <<EOF >&2
$0: This test is relatively expensive, so it is disabled by default.
diff --git a/tests/expr/basic b/tests/expr/basic
index 94527da10..ee264d94c 100755
--- a/tests/expr/basic
+++ b/tests/expr/basic
@@ -1,5 +1,24 @@
#!/bin/sh
# -*-perl-*-
+# Basic tests for "expr".
+
+# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/factor/basic b/tests/factor/basic
index b819c5ae5..8b91cce09 100755
--- a/tests/factor/basic
+++ b/tests/factor/basic
@@ -1,5 +1,24 @@
#!/bin/sh
# -*-perl-*-
+# Basic tests for "factor".
+
+# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/fmt/basic b/tests/fmt/basic
index ad536d116..77682f103 100755
--- a/tests/fmt/basic
+++ b/tests/fmt/basic
@@ -1,5 +1,24 @@
#!/bin/sh
# -*- perl -*-
+# Basic tests for "fmt".
+
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/fmt/long-line b/tests/fmt/long-line
index 9905e200c..e4aaec8cf 100755
--- a/tests/fmt/long-line
+++ b/tests/fmt/long-line
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure fmt -s works even on long lines
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
fmt --version
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index e5679eaa6..4577309c7 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to create Makefile.in.
## Makefile for Autoconf testsuite.
-## Copyright 2000, 2003 Free Software Foundation, Inc.
+## Copyright (C) 2000, 2003 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/tests/general/atgeneral.m4 b/tests/general/atgeneral.m4
index 7751c7ee2..da974ca6c 100644
--- a/tests/general/atgeneral.m4
+++ b/tests/general/atgeneral.m4
@@ -1,6 +1,6 @@
include(m4sh.m4) -*- Autoconf -*-
# M4 macros used in building test suites.
-# Copyright 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/tests/general/dd.at b/tests/general/dd.at
index 3be256cab..8978313e7 100644
--- a/tests/general/dd.at
+++ b/tests/general/dd.at
@@ -1,5 +1,22 @@
# -*- autoconf -*-
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
cat <<EOF
Executables (autoheader, autoupdate...)
diff --git a/tests/group-names b/tests/group-names
index ad4d0abd4..eb5716052 100644
--- a/tests/group-names
+++ b/tests/group-names
@@ -2,6 +2,23 @@
# Set `groups' to a space-separated list of at least two groups of which
# the user is a member.
+# Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
groups=${COREUTILS_GROUPS-`(id -G || /usr/xpg4/bin/id -G) 2>/dev/null`}
case "$groups" in
*' '*) ;;
diff --git a/tests/head/Makefile.am b/tests/head/Makefile.am
index 9fe1ff9d2..d4591ed8e 100644
--- a/tests/head/Makefile.am
+++ b/tests/head/Makefile.am
@@ -1,4 +1,21 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "head". -*-Makefile-*-
+
+# Copyright (C) 1997, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = head
diff --git a/tests/head/Test.pm b/tests/head/Test.pm
index 1eb167737..263ccaff1 100644
--- a/tests/head/Test.pm
+++ b/tests/head/Test.pm
@@ -1,3 +1,23 @@
+# Test "head".
+
+# Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/help-version b/tests/help-version
index 47cc9d467..2ed9312f0 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -2,6 +2,24 @@
# Make sure all these programs work properly
# when invoked with --help or --version.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
test "$VERBOSE" = yes && set -x
# Ensure that $SHELL is set to *some* value.
diff --git a/tests/install/basic-1 b/tests/install/basic-1
index 0fdb43953..c41ea889b 100755
--- a/tests/install/basic-1
+++ b/tests/install/basic-1
@@ -1,4 +1,23 @@
#! /bin/sh
+# Basic tests for "install".
+
+# Copyright (C) 1998, 2000, 2001, 2002, 2004, 2005 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/install/create-leading b/tests/install/create-leading
index 963e6a135..8cfb0205f 100755
--- a/tests/install/create-leading
+++ b/tests/install/create-leading
@@ -1,5 +1,23 @@
#! /bin/sh
# Test -D option.
+
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Note that the tests below use `ginstall', not install, because
# that's the name of the binary in ../../src.
diff --git a/tests/install/d-slashdot b/tests/install/d-slashdot
index 3c26b7b3b..904769d46 100755
--- a/tests/install/d-slashdot
+++ b/tests/install/d-slashdot
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that ginstall -d works with arguments specified with a trailing "/.".
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
install --version
diff --git a/tests/install/trap b/tests/install/trap
index 7bb09ae83..70f6767e4 100755
--- a/tests/install/trap
+++ b/tests/install/trap
@@ -2,6 +2,23 @@
# Ensure that `install -s' doesn't infloop when its parent
# process traps CHLD signal.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ginstall --version
diff --git a/tests/join/Makefile.am b/tests/join/Makefile.am
index 2328b3f15..a7dcb9ea5 100644
--- a/tests/join/Makefile.am
+++ b/tests/join/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "join".
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = join
diff --git a/tests/join/Test.pm b/tests/join/Test.pm
index e666a7510..37b1449ac 100644
--- a/tests/join/Test.pm
+++ b/tests/join/Test.pm
@@ -1,3 +1,22 @@
+# Test "join".
+
+# Copyright (C) 1996, 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/ln/backup-1 b/tests/ln/backup-1
index 30bdf1d93..b24669324 100755
--- a/tests/ln/backup-1
+++ b/tests/ln/backup-1
@@ -1,6 +1,24 @@
#!/bin/sh
# Try to create a symlink with backup where the destination file exists
# and the backup file name is a hard link to the destination file.
+
+# Copyright (C) 1999 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Based on a problem report from Jamie Lokier.
if test "$VERBOSE" = yes; then
diff --git a/tests/ln/misc b/tests/ln/misc
index ab63a975b..51155911a 100755
--- a/tests/ln/misc
+++ b/tests/ln/misc
@@ -1,4 +1,22 @@
#!/bin/sh
+# Miscellaneous tests for "ln".
+
+# Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/ln/sf-1 b/tests/ln/sf-1
index 8ebbfc0e2..971c25b87 100755
--- a/tests/ln/sf-1
+++ b/tests/ln/sf-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "ln -sf".
+
+# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
test=sf-1
diff --git a/tests/ln/target-1 b/tests/ln/target-1
index 91eb45da0..76da11cae 100755
--- a/tests/ln/target-1
+++ b/tests/ln/target-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "ln --target-dir" with one file.
+
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Before coreutils-4.5.3, --target-dir didn't work with one file.
# It would create the desired link, but would fail with a diagnosis like this:
# ln: `d/.': cannot overwrite directory
diff --git a/tests/ls-2/tests b/tests/ls-2/tests
index 8b30916b4..d0257a6a3 100755
--- a/tests/ls-2/tests
+++ b/tests/ls-2/tests
@@ -1,6 +1,24 @@
#!/bin/sh
# -*- perl -*-
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/ls/Makefile.am b/tests/ls/Makefile.am
index fc8af7c55..add9988c1 100644
--- a/tests/ls/Makefile.am
+++ b/tests/ls/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "ls". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
AUTOMAKE_OPTIONS = 1.2 gnits
diff --git a/tests/ls/Test.pm b/tests/ls/Test.pm
index 8d5d8d4db..f1be61fff 100644
--- a/tests/ls/Test.pm
+++ b/tests/ls/Test.pm
@@ -1,3 +1,22 @@
+# Test "ls".
+
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/ls/dangle b/tests/ls/dangle
index b08d245db..f9fc77022 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure ls properly handles dangling symlinks vs. ls's -L, -H, options.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/dired b/tests/ls/dired
index 8126e0a45..0bac42b60 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure --dired option works
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/file-type b/tests/ls/file-type
index 8eafe9554..27f2f7739 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -1,6 +1,23 @@
#!/bin/sh
# contrast ls -F, ls -p, and ls --indicator-style=file-type
+# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index 527393e56..cb6a6ed3c 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure ls -L always follows symlinks
+# Copyright (C) 2000, 2002, 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/infloop b/tests/ls/infloop
index 9e2ad79fc..b413b2a71 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -2,6 +2,23 @@
# show that the following no longer makes ls infloop
# mkdir loop; cd loop; ln -s ../loop sub; ls -RL
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/inode b/tests/ls/inode
index efaa02e1d..2a39b0262 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure that ls -i works properly on symlinks.
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/m-option b/tests/ls/m-option
index 855ca9088..f5b0cfcc5 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise the -m option
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index 46fa6d901..809397c2b 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure ls and `ls -R' do the right thing when invoked with no arguments.
+# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 455db181a..31e3fe104 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -2,6 +2,23 @@
# 4.1.1 and 4.1.2 had a bug whereby some recursive listings
# didn't include a blank line between per-directory groups of files.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1
index 3d89a7b9f..c7ba4e565 100755
--- a/tests/ls/rt-1
+++ b/tests/ls/rt-1
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure name is used as secondary key when sorting on mtime or ctime.
+# Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../envvar-check
. $srcdir/../lang-default
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index f6a50fda8..5851fdc7e 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -1,5 +1,23 @@
#!/bin/sh
# Ensure that ls --file-type does not call stat unnecessarily.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# The trick is to create an un-stat'able symlink and to see if ls
# can report its type nonetheless, using dirent.d_type.
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index fc6abf3a2..4b50a6977 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -2,6 +2,23 @@
# Verify that ls works properly when it fails to stat a file that is
# not mentioned on the command line.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index 048ba5fc4..eab3a69e5 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that d_ino (from ls -di) and st_ino (from stat --format=%i) match.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index 8862353e9..1caa2219b 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -1,6 +1,23 @@
#!/bin/sh
# Do dereference a symlink arg if its name is written with a trailing slash.
+# Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/ls/time-1 b/tests/ls/time-1
index 1d50033ca..aaaf04ad1 100755
--- a/tests/ls/time-1
+++ b/tests/ls/time-1
@@ -1,6 +1,24 @@
#!/bin/sh
# Test some of ls's sorting options.
+# Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ls --version
diff --git a/tests/md5sum/basic-1 b/tests/md5sum/basic-1
index 63221988a..5f02af257 100755
--- a/tests/md5sum/basic-1
+++ b/tests/md5sum/basic-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Basic tests for "md5sum".
+
+# Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/md5sum/newline-1 b/tests/md5sum/newline-1
index d0facd32f..5a4506fa0 100755
--- a/tests/md5sum/newline-1
+++ b/tests/md5sum/newline-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Newline tests for "md5sum".
+
+# Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am
index 5c01b43b4..8ff26e720 100644
--- a/tests/misc/Makefile.am
+++ b/tests/misc/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make miscellaneous coreutils tests. -*-Makefile-*-
+
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
EXTRA_DIST = $(TESTS)
diff --git a/tests/misc/base64 b/tests/misc/base64
index 11cae87c1..02591da86 100755
--- a/tests/misc/base64
+++ b/tests/misc/base64
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise base64.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/basename b/tests/misc/basename
index 490ad3952..89d96ff02 100755
--- a/tests/misc/basename
+++ b/tests/misc/basename
@@ -1,6 +1,23 @@
#!/bin/sh
# -*-perl-*-
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc
index b53864ef5..d6ff5011b 100755
--- a/tests/misc/cat-proc
+++ b/tests/misc/cat-proc
@@ -2,6 +2,23 @@
# Ensure that cat -E produces same output as cat, module `$'s,
# even when applied to a file in /proc.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cat --version
diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout
index 42cd92c65..a232fd746 100755
--- a/tests/misc/close-stdout
+++ b/tests/misc/close-stdout
@@ -2,6 +2,23 @@
# Ensure that several programs work fine, even with stdout initially closed.
# This is effectively a test of closeout.c's close_stdout function.
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/misc/csplit b/tests/misc/csplit
index 81a98afa5..1feea6645 100755
--- a/tests/misc/csplit
+++ b/tests/misc/csplit
@@ -1,6 +1,24 @@
#!/bin/sh
# various csplit tests
+# Copyright (C) 2001, 2002, 2003, 2004, 2005 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
csplit --version
diff --git a/tests/misc/date b/tests/misc/date
index 56577b34b..b9b253df3 100755
--- a/tests/misc/date
+++ b/tests/misc/date
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "date".
+
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/date-sec b/tests/misc/date-sec
index b296b7ea6..aac1e0a98 100755
--- a/tests/misc/date-sec
+++ b/tests/misc/date-sec
@@ -3,6 +3,23 @@
# `date --date="21:04 +0100" +%S' always prints `00'.
# Before coreutils-5.2.1, it would print the seconds from the current time.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
date --version
diff --git a/tests/misc/df b/tests/misc/df
index b1efe61ab..31040ca96 100755
--- a/tests/misc/df
+++ b/tests/misc/df
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that "df ." outputs a header.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
df --version
diff --git a/tests/misc/dirname b/tests/misc/dirname
index 63006ee2c..c217d9ab4 100755
--- a/tests/misc/dirname
+++ b/tests/misc/dirname
@@ -1,5 +1,23 @@
#!/bin/sh
# -*-perl-*-
+# Test "dirname".
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/expand b/tests/misc/expand
index 09373d59b..dcf06815f 100755
--- a/tests/misc/expand
+++ b/tests/misc/expand
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise expand.
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/false-status b/tests/misc/false-status
index 2d85bb56c..0397c2992 100755
--- a/tests/misc/false-status
+++ b/tests/misc/false-status
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that false exits nonzero even with --help or --version
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
false --version
diff --git a/tests/misc/fold b/tests/misc/fold
index d070d4586..ceab2e9d8 100755
--- a/tests/misc/fold
+++ b/tests/misc/fold
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise fold.
+# Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/head-c b/tests/misc/head-c
index bd899aff4..387a5be8f 100755
--- a/tests/misc/head-c
+++ b/tests/misc/head-c
@@ -1,5 +1,22 @@
#!/bin/sh
-# exercize the fix of 2001-08-18, based on test case from Ian Bruce
+# exercise the fix of 2001-08-18, based on test case from Ian Bruce
+
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/misc/head-elide-tail b/tests/misc/head-elide-tail
index b7a49a2cb..911ca6129 100755
--- a/tests/misc/head-elide-tail
+++ b/tests/misc/head-elide-tail
@@ -2,6 +2,23 @@
# -*- perl -*-
# Exercise head's --bytes=-N option.
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/head-pos b/tests/misc/head-pos
index a8791f2e9..edb334311 100755
--- a/tests/misc/head-pos
+++ b/tests/misc/head-pos
@@ -2,6 +2,23 @@
# When reading a specified number of lines, ensure that the output
# file pointer is positioned just after those lines.
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
head --version
diff --git a/tests/misc/mknod b/tests/misc/mknod
index b6670ab08..ca15feb8a 100755
--- a/tests/misc/mknod
+++ b/tests/misc/mknod
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that mknod, mkfifo, mkdir -m MODE work with a restrictive umask
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mknod --version
diff --git a/tests/misc/nice b/tests/misc/nice
index 99cb58eed..02c10b5fb 100755
--- a/tests/misc/nice
+++ b/tests/misc/nice
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test "nice".
+
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# This script takes no arguments.
if test -n "$DJDIR"; then
diff --git a/tests/misc/nl b/tests/misc/nl
index 2bc9c8936..2244ae281 100755
--- a/tests/misc/nl
+++ b/tests/misc/nl
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise nl functionality
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
nl --version
diff --git a/tests/misc/nohup b/tests/misc/nohup
index 112811705..d44d3f986 100755
--- a/tests/misc/nohup
+++ b/tests/misc/nohup
@@ -1,6 +1,23 @@
#!/bin/sh
# test nohup
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
nohup --version
diff --git a/tests/misc/paste-no-nl b/tests/misc/paste-no-nl
index b854f8385..6fafb0845 100755
--- a/tests/misc/paste-no-nl
+++ b/tests/misc/paste-no-nl
@@ -2,6 +2,23 @@
# -*- perl -*-
# Ensure that paste properly handles files lacking a final newline.
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1
index 7d2d3de88..eb7b462ad 100755
--- a/tests/misc/pathchk1
+++ b/tests/misc/pathchk1
@@ -1,6 +1,23 @@
#!/bin/sh
# pathchk tests
+# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
pathchk --version
diff --git a/tests/misc/printf b/tests/misc/printf
index 64d16f336..6b29277b0 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -1,6 +1,23 @@
#!/bin/sh
# basic tests for printf
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
prog=`pwd`/../../src/printf
if test "$VERBOSE" = yes; then
diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex
index 7fbd1c1dd..df001cd8d 100755
--- a/tests/misc/printf-hex
+++ b/tests/misc/printf-hex
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure that only two hex. digits are consumed in a \xHHH sequence
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
prog=`pwd`/../../src/printf
if test "$VERBOSE" = yes; then
diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long
index 5ae4c0449..c4af777f3 100755
--- a/tests/misc/pwd-long
+++ b/tests/misc/pwd-long
@@ -1,4 +1,22 @@
#!/bin/sh
+# Check "printf" with long arguments.
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
diff --git a/tests/misc/sha224sum b/tests/misc/sha224sum
index edbe05858..2b3c40201 100755
--- a/tests/misc/sha224sum
+++ b/tests/misc/sha224sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha224sum".
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha256sum b/tests/misc/sha256sum
index 2b65372b2..59ee0726e 100755
--- a/tests/misc/sha256sum
+++ b/tests/misc/sha256sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha256sum".
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha384sum b/tests/misc/sha384sum
index 507fb6737..823610441 100755
--- a/tests/misc/sha384sum
+++ b/tests/misc/sha384sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha384sum".
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sha512sum b/tests/misc/sha512sum
index f61c7149e..84f4cfb3c 100755
--- a/tests/misc/sha512sum
+++ b/tests/misc/sha512sum
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha512sum".
+
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/shuf b/tests/misc/shuf
index 17dea5045..585df9901 100755
--- a/tests/misc/shuf
+++ b/tests/misc/shuf
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that shuf randomizes its input.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
shuf --version
diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge
index d27f42ea1..a737e4d9d 100755
--- a/tests/misc/sort-merge
+++ b/tests/misc/sort-merge
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sort -m".
+
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand
index 37c19e0ab..04bcc477f 100755
--- a/tests/misc/sort-rand
+++ b/tests/misc/sort-rand
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that sort --sort-random doesn't sort.
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
sort --version
diff --git a/tests/misc/split-a b/tests/misc/split-a
index a9940b71f..3ae4736c2 100755
--- a/tests/misc/split-a
+++ b/tests/misc/split-a
@@ -1,6 +1,23 @@
#!/bin/sh
# Show that split -a works.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
split --version
diff --git a/tests/misc/split-fail b/tests/misc/split-fail
index 79bda949b..1268190b8 100755
--- a/tests/misc/split-fail
+++ b/tests/misc/split-fail
@@ -1,6 +1,23 @@
#!/bin/sh
# split must fail when given length/count of zero.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
split --version
diff --git a/tests/misc/split-l b/tests/misc/split-l
index 10148bab2..27c4c3f1b 100755
--- a/tests/misc/split-l
+++ b/tests/misc/split-l
@@ -1,6 +1,23 @@
#!/bin/sh
# show that `split --lines=2' works.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
ln --version
diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt
index 4283ff7df..560ea1014 100755
--- a/tests/misc/stat-fmt
+++ b/tests/misc/stat-fmt
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that stat properly handles a format string ending with %
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
stat --version
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf
index 13a63c4d9..ecd494093 100755
--- a/tests/misc/stat-printf
+++ b/tests/misc/stat-printf
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "stat --printf".
+
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue
index fd9e120ab..41764296b 100755
--- a/tests/misc/tac-continue
+++ b/tests/misc/tac-continue
@@ -3,6 +3,23 @@
# when it encounters an error with say the first one.
# With coreutils-5.2.1 and earlier, this test would fail.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tac --version
diff --git a/tests/misc/test-diag b/tests/misc/test-diag
index c154f38cf..87fe7573c 100755
--- a/tests/misc/test-diag
+++ b/tests/misc/test-diag
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test the diagnostics of "test".
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof
index 39e9e0399..37d4c3a04 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test whether programs exit upon a single EOF from a tty.
+
+# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0
index 8041359c8..758024aa7 100755
--- a/tests/misc/wc-files0
+++ b/tests/misc/wc-files0
@@ -1,6 +1,23 @@
#!/bin/sh
# Show that wc's new --files0-from option works.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
wc --version
diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from
index 459d87792..72f1bdf89 100755
--- a/tests/misc/wc-files0-from
+++ b/tests/misc/wc-files0-from
@@ -3,6 +3,23 @@
# Exercise wc's --files0-from option.
# This file bears a striking resemblance to tests/du/files0-from.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/mk-script b/tests/mk-script
index 3cc591900..d3de016f4 100755
--- a/tests/mk-script
+++ b/tests/mk-script
@@ -1,5 +1,24 @@
#! /usr/bin/perl -w
# -*- perl -*-
+# Make test scripts.
+
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
my $In = '.I';
my $Out = '.O';
diff --git a/tests/mkdir/concurrent-1 b/tests/mkdir/concurrent-1
index 0b1a9ae89..ff7e96946 100755
--- a/tests/mkdir/concurrent-1
+++ b/tests/mkdir/concurrent-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test whether "mkdir -p" works concurrently.
+
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# TMPDIR should be an absolute dir for this test.
# FIXME: enforce it
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1
index 272e35eee..5b9eb5b31 100755
--- a/tests/mkdir/p-1
+++ b/tests/mkdir/p-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "mkdir -p".
+
+# Copyright (C) 1997, 2000, 2002, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2
index 7e65697cb..38f238072 100755
--- a/tests/mkdir/p-2
+++ b/tests/mkdir/p-2
@@ -1,6 +1,23 @@
#!/bin/sh
# Just like p-1, but with an absolute path.
+# Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3
index c3e555201..3fab37827 100755
--- a/tests/mkdir/p-3
+++ b/tests/mkdir/p-3
@@ -3,6 +3,23 @@
# causes immediate failure. Also, ensure that we don't create
# subsequent, relative command-line arguments in the wrong place.
+# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot
index de99c5cd5..db750f655 100755
--- a/tests/mkdir/p-slashdot
+++ b/tests/mkdir/p-slashdot
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that mkdir -p works with arguments specified with a trailing "/.".
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink
index 448b8f7ea..26c3d7625 100755
--- a/tests/mkdir/p-thru-slink
+++ b/tests/mkdir/p-thru-slink
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/parents b/tests/mkdir/parents
index 7c37fa966..0bb98ccd0 100755
--- a/tests/mkdir/parents
+++ b/tests/mkdir/parents
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure mkdir's -p options works properly
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/perm b/tests/mkdir/perm
index 8fa2c49b2..842c881a5 100755
--- a/tests/mkdir/perm
+++ b/tests/mkdir/perm
@@ -2,6 +2,24 @@
# Verify that mkdir's `-m MODE' option works properly
# with various umask settings.
+# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index 5f0c24b9c..a5b65043b 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -1,6 +1,23 @@
#!/bin/sh
# verify that mkdir honors special bits in MODE
+# Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash
index b96bf67dd..de0f17f0c 100755
--- a/tests/mkdir/t-slash
+++ b/tests/mkdir/t-slash
@@ -2,6 +2,23 @@
# Ensure that mkdir works with arguments specified with and without
# a trailing slash.
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mkdir --version
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly
index ab55a22a6..ccd633e52 100755
--- a/tests/mkdir/writable-under-readonly
+++ b/tests/mkdir/writable-under-readonly
@@ -2,6 +2,23 @@
# This is just for the record.
# This test is not run.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# Test for the 2005-10-13 patch to lib/mkdir-p.c that fixed this sort
# of bug in mkdir:
#
diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am
index 91aa9a076..e5432837a 100644
--- a/tests/mv/Makefile.am
+++ b/tests/mv/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "mv". -*-Makefile-*-
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.3 gnits
XFAIL_TESTS = acl
diff --git a/tests/mv/acl b/tests/mv/acl
index e867e827b..52c6fe130 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -2,6 +2,23 @@
# move files/directories across file system boundaries
# and make sure acls are preserved
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../acl
. $srcdir/setup
# Make sure we get English translations.
diff --git a/tests/mv/atomic b/tests/mv/atomic
index b0707ff54..4a9047f2a 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that mv doesn't first unlink its destination in one particular case
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index db63e7383..00ecc1033 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -1,6 +1,23 @@
#!/bin/sh
# Force mv to use the copying code.
+# Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/childproof b/tests/mv/childproof
index c1e339ac2..b6101d36e 100755
--- a/tests/mv/childproof
+++ b/tests/mv/childproof
@@ -2,6 +2,23 @@
# Ensure that cp/mv don't clobber a just-copied file.
# With fileutils-4.1 and earlier, this test would fail.
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/mv/diag b/tests/mv/diag
index c8d08925d..c3aaa52e7 100755
--- a/tests/mv/diag
+++ b/tests/mv/diag
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure we get proper diagnostics: e.g., with --target-dir=d but no args
+# Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/dir-file b/tests/mv/dir-file
index c51448a55..417b51d53 100755
--- a/tests/mv/dir-file
+++ b/tests/mv/dir-file
@@ -1,6 +1,23 @@
#!/bin/sh
# mv must fail when src and dest are mismatched directory/non-directory.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir
index 189b4f991..28462a44f 100755
--- a/tests/mv/dir2dir
+++ b/tests/mv/dir2dir
@@ -2,6 +2,23 @@
# Ensure that mv prints the right diagnostic for a dir->dir move
# where the destination directory is not empty.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/dup-source b/tests/mv/dup-source
index ad2b7eb3f..b3d86daad 100755
--- a/tests/mv/dup-source
+++ b/tests/mv/dup-source
@@ -4,6 +4,23 @@
# made this fail: cp a a d/
# Ensure that mv fails with a similar command.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/mv/force b/tests/mv/force
index 2293b2d65..3836ec046 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -1,6 +1,23 @@
#!/bin/sh
# move a file onto itself
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2
index 1af8fb121..7dcc6c34a 100755
--- a/tests/mv/hard-2
+++ b/tests/mv/hard-2
@@ -2,6 +2,23 @@
# Ensure that moving hard-linked arguments onto existing destinations works.
# Likewise when using cp --preserve=link.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index fc8a6908a..b51411775 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -1,6 +1,25 @@
#!/bin/sh
# Ensure that using `cp --preserve=link' to copy hard-linked arguments
# onto existing destinations works, even when one of the link operations fails.
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# This bug was fixed in coreutils-4.5.9.
# To exercise this bug is non-trivial:
# Set-up requires at least three hard-linked files. In copying them,
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4
index 87bf710b5..d44df0852 100755
--- a/tests/mv/hard-4
+++ b/tests/mv/hard-4
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that mv removes a in this case: touch a; ln a b; mv a b
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index 6f7d1b7de..03327ad14 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -2,6 +2,23 @@
# move a directory containing hard-linked files and
# make sure the links are preserved
+# Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/i-1 b/tests/mv/i-1
index 97389267d..3ab73c08d 100755
--- a/tests/mv/i-1
+++ b/tests/mv/i-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Make sure a `n' reply to `mv -i...' aborts the move operation.
+
+# Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index 82cce5710..a3f51102b 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -2,6 +2,23 @@
# Test both cp and mv for their behavior with -if and -fi
# The standards (POSIX and SuS) dictate annoyingly inconsistent behavior.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 68207a0bf..cd59e66ad 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -2,6 +2,23 @@
# Make sure that `mv file unwritable-file' prompts the user
# and that `mv -f file unwritable-file' doesn't.
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/i-4 b/tests/mv/i-4
index 8de127c38..7d547a1bd 100755
--- a/tests/mv/i-4
+++ b/tests/mv/i-4
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure `mv -i a b' does its job with a positive response
+# Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no
index 43e404ee0..70208317d 100755
--- a/tests/mv/i-link-no
+++ b/tests/mv/i-link-no
@@ -1,6 +1,23 @@
#!/bin/sh
# Show that mv doesn't preserve links to files the user has declined to move.
+# Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/into-self b/tests/mv/into-self
index d6120aed7..69f0e5d18 100755
--- a/tests/mv/into-self
+++ b/tests/mv/into-self
@@ -1,6 +1,23 @@
#! /bin/sh
# Demonstrate how mv fails when it tries to move a directory into itself.
+# Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index 7c8a3404c..f5b7f74f8 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -3,6 +3,23 @@
# Consider the case where SRC and DEST are on different
# partitions and DEST is a symlink to SRC.
+# Copyright (C) 1998, 1999, 200 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3
index 8641468ef..6b08d3105 100755
--- a/tests/mv/into-self-3
+++ b/tests/mv/into-self-3
@@ -1,6 +1,23 @@
#!/bin/sh
# move a directory into itself, with a twist
+# Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4
index 6aaf35d86..4c94f20d9 100755
--- a/tests/mv/into-self-4
+++ b/tests/mv/into-self-4
@@ -2,6 +2,23 @@
# confirm that `mv symlink symlink' doesn't remove symlink
# Based on an example from David Luyer.
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 6e6e405db..347aacfd9 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -2,6 +2,24 @@
# Exercise mv's file-descriptor-leak bug, reported against coreutils-5.2.1
# and fixed (properly) on 2004-10-21.
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# This test is relatively expensive, and might well evoke a
# framework-failure on systems with a smaller command-line length
# limit so don't run it by default.
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 894d3562c..b4b42c5c6 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test "mv" with special files.
+
+# Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
set -x
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir
index d9c5ff9b4..36c2e0e86 100755
--- a/tests/mv/no-target-dir
+++ b/tests/mv/no-target-dir
@@ -2,6 +2,23 @@
# ensure that --no-target-directory (-T) works when the destination is
# an empty directory.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index 326d5bc1f..c4aae78e4 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -4,6 +4,23 @@
# This is a bit fragile since it relies on the string used
# for EPERM: `permission denied'.
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index dc845c94e..9fb6c00cd 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -4,6 +4,23 @@
# For additional constraints, see the comment in copy.c.
# Before coreutils-5.2.1, this test would fail.
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index f8a142589..50df1c265 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -3,6 +3,23 @@
# another, and giving it a different name at the destination would cause mv
# to get a failed assertion.
+# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index b7dbfe67f..c7c6132ef 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -2,6 +2,23 @@
# make sure cp and mv can handle many combinations of local and
# other-partition regular/symlink'd files.
+# Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index 768436628..cf68aabd4 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure permissions are preserved when moving from one partition to another.
+# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1
index d7afc5f4c..d1b5276b8 100755
--- a/tests/mv/perm-1
+++ b/tests/mv/perm-1
@@ -2,6 +2,23 @@
# ensure that mv gives one diagnostic, not two, when failing
# due to lack of permissions
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/reply-no b/tests/mv/reply-no
index 7ac7f996c..ba45cc056 100755
--- a/tests/mv/reply-no
+++ b/tests/mv/reply-no
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that `mv --reply=no f1 f2' works.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/setup b/tests/mv/setup
index 60d834463..0886437aa 100755
--- a/tests/mv/setup
+++ b/tests/mv/setup
@@ -4,6 +4,23 @@
# of the current directory. If one is found, create a temporary directory
# inside it.
+# Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
test "${CANDIDATE_TMP_DIRS+set}" = set \
|| CANDIDATE_TMP_DIRS="$TMPDIR /tmp /var/tmp /usr/tmp $HOME"
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index 354a10763..864fef6c7 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -2,6 +2,23 @@
# Make sure that the copying code used in an inter-partition
# move unlinks a destination symlink before opening it.
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash
index a81d178a8..19343b122 100755
--- a/tests/mv/trailing-slash
+++ b/tests/mv/trailing-slash
@@ -2,6 +2,23 @@
# On some operating systems, e.g. SunOS-4.1.1_U1 on sun3x,
# rename() doesn't accept trailing slashes.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
mv --version
diff --git a/tests/mv/update b/tests/mv/update
index ba6f8276c..78bb7d2f8 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure --update works as advertised
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
cp --version
diff --git a/tests/mv/vfat b/tests/mv/vfat
index 3bcbaa724..20b10e26e 100644
--- a/tests/mv/vfat
+++ b/tests/mv/vfat
@@ -2,6 +2,23 @@
# This is just for the record.
# This test is not run.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
exit 0
cat <<\EOF
diff --git a/tests/od/od-N b/tests/od/od-N
index cd6fae671..7c5684525 100755
--- a/tests/od/od-N
+++ b/tests/od/od-N
@@ -1,6 +1,23 @@
#!/bin/sh
# Verify that `od -N N' reads no more than N bytes of input.
+# Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
od --version
diff --git a/tests/od/x8 b/tests/od/x8
index cdb536fa5..6b971994a 100755
--- a/tests/od/x8
+++ b/tests/od/x8
@@ -2,6 +2,23 @@
# verify that od -t x8 works properly
# This would fail before coreutils-4.5.2.
+# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
od --version
diff --git a/tests/pr/Makefile.am b/tests/pr/Makefile.am
index c253a36f9..9b0e841ea 100644
--- a/tests/pr/Makefile.am
+++ b/tests/pr/Makefile.am
@@ -1,3 +1,23 @@
+# Make coreutils tests for "pr". -*-Makefile-*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
##test-files-begin
diff --git a/tests/pr/Test.pm b/tests/pr/Test.pm
index 7aba45d42..c1fc49ab8 100644
--- a/tests/pr/Test.pm
+++ b/tests/pr/Test.pm
@@ -1,4 +1,23 @@
# -*-perl-*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/priv-check b/tests/priv-check
index 6de80fe50..b0d6c92b9 100644
--- a/tests/priv-check
+++ b/tests/priv-check
@@ -2,6 +2,23 @@
# Source this file at the beginning of a test that works
# only when run as root or as non-root.
+# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
case "$PRIV_CHECK_ARG" in
require-root) who='as root';;
require-non-root) who='by an unprivileged user';;
diff --git a/tests/readlink/can-e b/tests/readlink/can-e
index 7d2eb43c0..9cb3d475c 100755
--- a/tests/readlink/can-e
+++ b/tests/readlink/can-e
@@ -1,6 +1,23 @@
#!/bin/sh
# tests for canonicalize-existing mode (readlink -e).
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
readlink --version
diff --git a/tests/readlink/can-f b/tests/readlink/can-f
index d71626df4..03b54f4b0 100755
--- a/tests/readlink/can-f
+++ b/tests/readlink/can-f
@@ -1,6 +1,23 @@
#!/bin/sh
# tests for canonicalize mode (readlink -f).
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
readlink --version
diff --git a/tests/readlink/can-m b/tests/readlink/can-m
index 757e3bcb6..af59e5bde 100755
--- a/tests/readlink/can-m
+++ b/tests/readlink/can-m
@@ -1,6 +1,23 @@
#!/bin/sh
# tests for canonicalize-missing mode (readlink -m).
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
readlink --version
diff --git a/tests/readlink/rl-1 b/tests/readlink/rl-1
index 6ebbe923e..eec0d91ff 100755
--- a/tests/readlink/rl-1
+++ b/tests/readlink/rl-1
@@ -1,6 +1,23 @@
#!/bin/sh
# test for readlink mode.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
readlink --version
diff --git a/tests/rm/Makefile.am b/tests/rm/Makefile.am
index 4a5e836dc..4b5c3e85a 100644
--- a/tests/rm/Makefile.am
+++ b/tests/rm/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "rm". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.1 gnits
TESTS = \
diff --git a/tests/rm/cycle b/tests/rm/cycle
index b021c5707..f77f90df9 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -1,6 +1,23 @@
#!/bin/sh
# rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index 1072776cb..388ca1d07 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -4,6 +4,23 @@
# But for fileutils-4.1.9, it would do the former and
# for fileutils-4.1.10 the latter.
+# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index b1cb5928d..b5ae89754 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm" with a deep hierarchy.
+
+# Copyright (C) 1997, 2002, 2003, 2004, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
# This is a bit of a torture test for mkdir -p, too.
# GNU rm performs *much* better on systems that have a d_type member
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index 39e508e5e..6dd04aa3e 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -2,6 +2,23 @@
# rm (without -r) must give a diagnostic for any directory.
# It must not prompt, even if that directory is unwritable.
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index eaacdb368..fd10ba936 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -2,6 +2,23 @@
# Ensure that `rm dir' (i.e., without --recursive) gives a reasonable
# diagnostic when failing.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index 91a41e663..41bea4aaa 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -2,6 +2,23 @@
# Use rm -r to remove two non-empty dot-relative directories.
# This would have failed between 2004-10-18 and 2004-10-21.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 6c009759f..5db86ad42 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that rm -rf removes an empty-and-inaccessible directory.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/empty-name b/tests/rm/empty-name
index 90caa2671..e24a722ff 100755
--- a/tests/rm/empty-name
+++ b/tests/rm/empty-name
@@ -1,5 +1,24 @@
#!/bin/sh
# Make sure that rm -r '' fails.
+
+# Copyright (C) 1998, 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 5c339a0d2..bdd41d7ec 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm -f" with a nonexistent file.
+
+# Copyright (C) 1997, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
test=f-1
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 7ee0e2a14..d53747374 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -2,6 +2,23 @@
# Like fail-eperm, but the failure must be for a file encountered
# while trying to remove the containing directory with the sticky bit set.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm
index 22dd1f728..d3bfd42c8 100755
--- a/tests/rm/fail-eperm
+++ b/tests/rm/fail-eperm
@@ -3,6 +3,23 @@
# Ensure that rm gives the expected diagnostic when failing to remove a file
# owned by some other user in a directory with the sticky bit set.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/hash b/tests/rm/hash
index 8e7f8ce86..a07a2b1d0 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -3,6 +3,23 @@
# Before then, rm would fail occasionally, sometimes via
# a failed assertion, others with a seg fault.
+# Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../expensive
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index 7d3ac1e1b..0e606a2ab 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm -i".
+
+# Copyright (C) 1997, 1998, 2002, 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
test=i-1
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index 57733c8fd..c0a0a8104 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -3,6 +3,23 @@
# recurse into directory DIR. rm -i (without -r) must fail in that case.
# Fixed in coreutils-4.5.2.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 79d691676..37c86b318 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -2,6 +2,23 @@
# Ensure that rm works even when run from a directory
# for which the user has no access at all.
+# Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always
index ca8f38262..6dc623161 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -1,6 +1,23 @@
#!/bin/sh
# Test the --interactive[=WHEN] changes added to coreutils 6.0
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
test=interactive-always
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index 4d55337fe..9643eff90 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -1,6 +1,23 @@
#!/bin/sh
# Test the -I option added to coreutils 6.0
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
test=interactive-once
if test "$VERBOSE" = yes; then
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index e99c75895..4a84ecdf0 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -ir".
+
+# Copyright (C) 1997, 1998, 2002, 2004, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
test=ir-1
diff --git a/tests/rm/isatty b/tests/rm/isatty
index 6985860eb..488788a5e 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -1,6 +1,24 @@
#!/bin/sh
# Make sure `chown 0 f; rm f' prompts before removing f.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index df26acb14..cabfc8840 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -2,6 +2,23 @@
# With rm from coreutils-5.2.1 and earlier, `rm -r' would mistakenly
# give up too early under some conditions.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index 30d37b872..6c03454c2 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -r --verbose".
+
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
test=r-1
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 127366471..5064413f6 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "rm -r --verbose".
+
+# Copyright (C) 1997, 1998, 2000, 2002, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
if test "$VERBOSE" = yes; then
rm --version
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index debc80228..0bd6c4f85 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -1,5 +1,25 @@
#!/bin/sh
# Create and remove a directory with more than 254 files.
+
+# Copyright (C) 1997, 2001, 2002, 2003, 2004 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# An early version of my rewritten rm failed to remove all of
# the files on SunOS4 when there were 254 or more in a directory.
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index 397f4e865..3a73b0a35 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise another small part of remove.c
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index 00ea855b7..7fd5c1716 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -1,6 +1,24 @@
#!/bin/sh
# exercise another small part of remove.c
+# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index f27fd6cf5..a4c7b68d7 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise another small part of remove.c
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index 28af0d9d9..434ab2d8d 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that `rm dir' fails without --recursive
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index 7868e903a..a08f93f13 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -1,6 +1,23 @@
#!/bin/sh
# a basic test of rm -ri
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index c54a6db5d..abee7a18c 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -1,5 +1,24 @@
#!/bin/sh
# Make sure that rm -r '' fails.
+
+# Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# On SunOS 4.1.3, running rm -r '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 55c74ff69..403a89198 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -1,6 +1,23 @@
#!/bin/sh
# exercise one small part of remove.c
+# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index d42ffe00d..3d359a770 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that rm works even from an unreadable working directory.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rm --version
diff --git a/tests/rm/unreadable b/tests/rm/unreadable
index a748da422..ca24deb86 100755
--- a/tests/rm/unreadable
+++ b/tests/rm/unreadable
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "rm" and unreadable directories.
+
+# Copyright (C) 1998, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/rmdir/fail-perm b/tests/rmdir/fail-perm
index 3b89417f1..2fa83ceda 100755
--- a/tests/rmdir/fail-perm
+++ b/tests/rmdir/fail-perm
@@ -2,6 +2,23 @@
# For unwritable directory `d', `rmdir -p d d/e/f' would emit
# diagnostics but would not fail. Fixed in 5.1.2.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rmdir --version
diff --git a/tests/rmdir/ignore b/tests/rmdir/ignore
index 507f32024..ba6db028a 100755
--- a/tests/rmdir/ignore
+++ b/tests/rmdir/ignore
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure rmdir's --ignore-fail-on-non-empty option works
+# Copyright (C) 1999 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rmdir --version
diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash
index bc67c846b..7bcd91eed 100755
--- a/tests/rmdir/t-slash
+++ b/tests/rmdir/t-slash
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure rmdir -p works on a directory specified with a trailing slash
+# Copyright (C) 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
rmdir --version
diff --git a/tests/rwx-to-mode b/tests/rwx-to-mode
index e58b73d40..fbeb6702a 100755
--- a/tests/rwx-to-mode
+++ b/tests/rwx-to-mode
@@ -3,6 +3,23 @@
# to the equivalent chmod --mode (-m) argument, (=,u=rwx,g=r,o=x and
# =,u=rw,g=rx,o=wx). Ignore ACLs.
+# Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
case $# in
1) rwx=$1;;
*) echo "$0: wrong number of arguments" 1>&2
diff --git a/tests/sample-test b/tests/sample-test
index 7552fb410..ac100f294 100644
--- a/tests/sample-test
+++ b/tests/sample-test
@@ -1,6 +1,23 @@
#!/bin/sh
# FIXME
+# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
FIXME --version
diff --git a/tests/seq/basic b/tests/seq/basic
index 85ec38462..bca9f5258 100755
--- a/tests/seq/basic
+++ b/tests/seq/basic
@@ -1,5 +1,23 @@
#!/bin/sh
# -*- perl -*-
+# Test "seq".
+
+# Copyright (C) 1999, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/setgid-check b/tests/setgid-check
index 21547d78a..adeefb664 100644
--- a/tests/setgid-check
+++ b/tests/setgid-check
@@ -2,6 +2,23 @@
# Disable the current test if the working directory seems to have
# the setgid bit set.
+# Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# This test should be run in the temporary directory that ends
# up being removed via the trap commands.
diff --git a/tests/sha1sum/basic-1 b/tests/sha1sum/basic-1
index d9a9206c9..35562bd4a 100755
--- a/tests/sha1sum/basic-1
+++ b/tests/sha1sum/basic-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sha1sum".
+
+# Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/sha1sum/sample-vec b/tests/sha1sum/sample-vec
index fafbd247b..86dfd4b5a 100755
--- a/tests/sha1sum/sample-vec
+++ b/tests/sha1sum/sample-vec
@@ -1,4 +1,22 @@
#!/bin/sh
+# Sample vectors for "sha1sum".
+
+# Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/shred/exact b/tests/shred/exact
index 6ed1ca5db..bef320584 100755
--- a/tests/shred/exact
+++ b/tests/shred/exact
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure that neither --exact nor --zero gobbles a command line argument
+# Copyright (C) 2000, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
shred --version
diff --git a/tests/shred/remove b/tests/shred/remove
index 32a53f941..be6cf173e 100755
--- a/tests/shred/remove
+++ b/tests/shred/remove
@@ -1,6 +1,23 @@
#!/bin/sh
# Exercise a bug that was fixed in shred-4.0l
+# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
shred --version
diff --git a/tests/sort-time/Makefile b/tests/sort-time/Makefile
index 559c088cd..3bd8f1603 100644
--- a/tests/sort-time/Makefile
+++ b/tests/sort-time/Makefile
@@ -1,3 +1,20 @@
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
N = 1000000
dot30 = ..............................
diff --git a/tests/sort-time/README b/tests/sort-time/README
index d45862226..14b7e2119 100644
--- a/tests/sort-time/README
+++ b/tests/sort-time/README
@@ -1,4 +1,23 @@
# determine whether it's worthwhile to add a --line-length=N option to sort.
+
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# Add the option and perform this test:
#
# Test method:
diff --git a/tests/sort-time/rand-gen b/tests/sort-time/rand-gen
index f4f110b41..d0bab646f 100755
--- a/tests/sort-time/rand-gen
+++ b/tests/sort-time/rand-gen
@@ -3,6 +3,24 @@
# Each value is in the range [0,1).
# Usage: rand n
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# Use only the basename from the path to this executable in error messages.
($program_name = $0) =~ s|.*/||;
diff --git a/tests/sort/Makefile.am b/tests/sort/Makefile.am
index 1c88ef9dd..c117ae114 100644
--- a/tests/sort/Makefile.am
+++ b/tests/sort/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "sort". -*-Makefile-*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = sort
diff --git a/tests/sort/Test.pm b/tests/sort/Test.pm
index 2f2202da0..fbc6c49d0 100755
--- a/tests/sort/Test.pm
+++ b/tests/sort/Test.pm
@@ -1,4 +1,24 @@
# -*-perl-*-
+# Test "sort".
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
+# 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/stty/basic-1 b/tests/stty/basic-1
index 8cdc45994..5af1ab34f 100755
--- a/tests/stty/basic-1
+++ b/tests/stty/basic-1
@@ -1,6 +1,24 @@
#! /bin/sh
# Make sure stty can parse most of its options.
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
stty --version
diff --git a/tests/stty/row-col-1 b/tests/stty/row-col-1
index f4b37dfda..926579b1b 100755
--- a/tests/stty/row-col-1
+++ b/tests/stty/row-col-1
@@ -1,4 +1,25 @@
#! /bin/sh
+# Test "stty" with rows and columns.
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# This script takes no arguments.
if test "$VERBOSE" = yes; then
diff --git a/tests/sum/basic-1 b/tests/sum/basic-1
index c42d4ddf4..2f5b2e12b 100755
--- a/tests/sum/basic-1
+++ b/tests/sum/basic-1
@@ -1,4 +1,22 @@
#!/bin/sh
+# Test "sum".
+
+# Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/sum/sysv b/tests/sum/sysv
index 4c9014245..bdd317ab0 100755
--- a/tests/sum/sysv
+++ b/tests/sum/sysv
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure `sum -s' works for input whose sum of bytes is larger than 2^32
+# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
sum --version
diff --git a/tests/tac/Makefile.am b/tests/tac/Makefile.am
index 40b3d10d1..c98266d8c 100644
--- a/tests/tac/Makefile.am
+++ b/tests/tac/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "tac". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = tac
diff --git a/tests/tac/Test.pm b/tests/tac/Test.pm
index cf5ca92ca..8e46b4616 100644
--- a/tests/tac/Test.pm
+++ b/tests/tac/Test.pm
@@ -1,3 +1,22 @@
+# Test "tac".
+
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/tail-2/Makefile.am b/tests/tail-2/Makefile.am
index 1a58c75ef..df0dd20f9 100644
--- a/tests/tail-2/Makefile.am
+++ b/tests/tail-2/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "tail". -*-Makefile-*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
EXTRA_DIST = $(TESTS)
diff --git a/tests/tail-2/append-only b/tests/tail-2/append-only
index 591e9edf9..f5dcb17cd 100755
--- a/tests/tail-2/append-only
+++ b/tests/tail-2/append-only
@@ -2,6 +2,23 @@
# Ensure that tail -f works on an append-only file
# Requires root access to do chattr +a, as well as an ext[23] or xfs file system
+# Copyright (C) 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tail --version
diff --git a/tests/tail-2/assert b/tests/tail-2/assert
index a837798f3..4d46904fd 100755
--- a/tests/tail-2/assert
+++ b/tests/tail-2/assert
@@ -1,4 +1,24 @@
#!/bin/sh
+# Test for assertion failure in "test".
+
+# Copyright (C) 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# This test fails with tail from textutils-2.0.
# It would get something like this:
# tail: tail.c:718: recheck: Assertion `valid_file_spec (f)' failed.
diff --git a/tests/tail-2/assert-2 b/tests/tail-2/assert-2
index c036e2619..10f3f1961 100755
--- a/tests/tail-2/assert-2
+++ b/tests/tail-2/assert-2
@@ -3,6 +3,23 @@
# Due to a race condition in the test, the `assert' script would get
# the UMR on Solaris only some of the time, and not at all on Linux/GNU.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tail --version
diff --git a/tests/tail-2/big-4gb b/tests/tail-2/big-4gb
index 9b53f7989..5f94cb68f 100755
--- a/tests/tail-2/big-4gb
+++ b/tests/tail-2/big-4gb
@@ -2,6 +2,23 @@
# Demonstrate a bug in `tail -cN' when operating on files of size 4G and larger
# Fixed in coreutils-4.5.2.
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
. $srcdir/../expensive
if test "$VERBOSE" = yes; then
diff --git a/tests/tail-2/fflush b/tests/tail-2/fflush
index dd630c5a7..e78de66e8 100755
--- a/tests/tail-2/fflush
+++ b/tests/tail-2/fflush
@@ -3,6 +3,24 @@
# The problem was that using the solaris5.7 setvbuf function to turn off
# buffering doesn't flush stdout.
+# Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# FIXME: actually, I couldn't find a way to write the test (without resorting
# to use of expect) so that it would provoke the failure on solaris5.7.
# To exercise the bug, cat's stdout seems to have to be directed
diff --git a/tests/tail-2/infloop-1 b/tests/tail-2/infloop-1
index a540a645b..ff6e712bf 100755
--- a/tests/tail-2/infloop-1
+++ b/tests/tail-2/infloop-1
@@ -1,6 +1,23 @@
#!/bin/sh
# This test would fail with tail from pre-1.22i textutils.
+# Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tail --version
diff --git a/tests/tail-2/proc-ksyms b/tests/tail-2/proc-ksyms
index 52e2a6fc3..6a035f78c 100755
--- a/tests/tail-2/proc-ksyms
+++ b/tests/tail-2/proc-ksyms
@@ -1,6 +1,23 @@
#!/bin/sh
# Prior to textutils-2.0.17, `tail /proc/ksyms' would segfault on Linux.
+# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tail --version
diff --git a/tests/tail-2/start-middle b/tests/tail-2/start-middle
index 4dbe18900..3d3dd10da 100755
--- a/tests/tail-2/start-middle
+++ b/tests/tail-2/start-middle
@@ -2,6 +2,23 @@
# Verify that tail works even when it's reading from a file
# that is not at its beginning. Based on a report from John Roll.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tail --version
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f
index 3e78fb2ff..c5692dccc 100755
--- a/tests/tail-2/tail-n0f
+++ b/tests/tail-2/tail-n0f
@@ -1,6 +1,25 @@
#!/bin/sh
# Make sure that `tail -n0 -f' and `tail -c0 -f' sleep
# rather than doing what amounted to a busy-wait.
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# This bug was fixed for 5.0.91
# It skips the test if your system lacks a /proc/$pid/status
# file, or if its contents don't look right.
diff --git a/tests/tail/Makefile.am b/tests/tail/Makefile.am
index 8b67c9d8f..4fc583665 100644
--- a/tests/tail/Makefile.am
+++ b/tests/tail/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "tail". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = tail
diff --git a/tests/tail/Test.pm b/tests/tail/Test.pm
index ee5fca055..056f3aee0 100755
--- a/tests/tail/Test.pm
+++ b/tests/tail/Test.pm
@@ -1,3 +1,23 @@
+# Test "tail".
+
+# Copyright (C) 1997, 1998, 2002, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/tee/basic b/tests/tee/basic
index 37dfc99d0..2c2702bc8 100755
--- a/tests/tee/basic
+++ b/tests/tee/basic
@@ -1,6 +1,23 @@
#!/bin/sh
# test for basic tee functionality.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tee --version
diff --git a/tests/tee/dash b/tests/tee/dash
index cc45f8694..6be774d4a 100755
--- a/tests/tee/dash
+++ b/tests/tee/dash
@@ -1,6 +1,23 @@
#!/bin/sh
# test for "tee -".
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
tee --version
diff --git a/tests/test/Makefile.am b/tests/test/Makefile.am
index 8e5edf3cb..2b05958c0 100644
--- a/tests/test/Makefile.am
+++ b/tests/test/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "test". -*-Makefile-*-
+
+# Copyright (C) 1998, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = test
diff --git a/tests/test/Test.pm b/tests/test/Test.pm
index b1fd54e80..865fc4816 100644
--- a/tests/test/Test.pm
+++ b/tests/test/Test.pm
@@ -1,3 +1,22 @@
+# Test "test".
+
+# Copyright (C) 1998, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# -*-perl-*-
package Test;
require 5.002;
diff --git a/tests/touch/Makefile.am b/tests/touch/Makefile.am
index 3c5900fa0..6a7554746 100644
--- a/tests/touch/Makefile.am
+++ b/tests/touch/Makefile.am
@@ -1,4 +1,23 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "touch". -*-Makefile-*-
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
AUTOMAKE_OPTIONS = 1.3 gnits
TESTS = \
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
index b61beb4bb..2f4390211 100755
--- a/tests/touch/dangling-symlink
+++ b/tests/touch/dangling-symlink
@@ -2,6 +2,23 @@
# Make sure touch can create a file through a dangling symlink.
# This was broken in the 4.0[e-i] test releases.
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/empty-file b/tests/touch/empty-file
index c9092b258..22d857ee1 100755
--- a/tests/touch/empty-file
+++ b/tests/touch/empty-file
@@ -1,5 +1,24 @@
#!/bin/sh
# Make sure touch can set the mtime on an empty file.
+
+# Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+
# Volker Borchert reported that touch 3.16r (and presumably all before that)
# fails to work on SunOS 4.1.3 with `most of the recommended patches' when
# the empty file is on an NFS-mounted 4.2 volume.
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag
index f6dba8ee3..50b19d41d 100755
--- a/tests/touch/fail-diag
+++ b/tests/touch/fail-diag
@@ -1,6 +1,23 @@
#!/bin/sh
# make sure touch gives reasonable diagnostics
+# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/fifo b/tests/touch/fifo
index 27071fbfe..dc33c0f28 100755
--- a/tests/touch/fifo
+++ b/tests/touch/fifo
@@ -1,6 +1,23 @@
#!/bin/sh
# Make sure touch works on fifos without hanging.
+# Copyright (C) 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing
index 781b5a951..cdba337e9 100755
--- a/tests/touch/no-create-missing
+++ b/tests/touch/no-create-missing
@@ -1,6 +1,23 @@
#!/bin/sh
# Ensure that touch -c no-such-file no longer fails (it did in 4.1.8).
+# Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/no-rights b/tests/touch/no-rights
index cf0a92267..0d9e3bd86 100755
--- a/tests/touch/no-rights
+++ b/tests/touch/no-rights
@@ -2,6 +2,23 @@
# Make sure touch can update the times on a file that is neither
# readable nor writable.
+# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/not-owner b/tests/touch/not-owner
index 1002c0cd9..59282caef 100755
--- a/tests/touch/not-owner
+++ b/tests/touch/not-owner
@@ -2,6 +2,23 @@
# Make sure that touch gives reasonable diagnostics when applied
# to an unwritable directory owned by some other user.
+# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent
index 98dfdd742..000ccf558 100755
--- a/tests/touch/obsolescent
+++ b/tests/touch/obsolescent
@@ -1,6 +1,23 @@
#!/bin/sh
# Test touch with obsolescent 8- or 10-digit time stamps.
+# Copyright (C) 2000, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
_POSIX2_VERSION=199209; export _POSIX2_VERSION
POSIXLY_CORRECT=1; export POSIXLY_CORRECT
diff --git a/tests/touch/read-only b/tests/touch/read-only
index 11516d3c8..de59f0762 100755
--- a/tests/touch/read-only
+++ b/tests/touch/read-only
@@ -1,6 +1,23 @@
#!/bin/sh
# ensure that touch can operate on read-only files
+# Copyright (C) 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/touch/relative b/tests/touch/relative
index d996cd455..35d1d4d46 100755
--- a/tests/touch/relative
+++ b/tests/touch/relative
@@ -2,6 +2,23 @@
# Demonstrate using a combination of --reference and --date to
# set the time of a file back by an arbitrary amount.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
if test "$VERBOSE" = yes; then
set -x
touch --version
diff --git a/tests/tr/Makefile.am b/tests/tr/Makefile.am
index 0498d7ab6..4bebd6130 100644
--- a/tests/tr/Makefile.am
+++ b/tests/tr/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "tr". -*-Makefile-*-
+
+# Copyright (C) 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = tr
diff --git a/tests/tr/Test.pm b/tests/tr/Test.pm
index b1fb423ff..3475740e0 100755
--- a/tests/tr/Test.pm
+++ b/tests/tr/Test.pm
@@ -1,3 +1,23 @@
+# Test "tr".
+
+# Copyright (C) 1996, 1997, 2000, 2002, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/tr/failures b/tests/tr/failures
index defc474ce..ab7d50f8c 100644
--- a/tests/tr/failures
+++ b/tests/tr/failures
@@ -1,3 +1,22 @@
+# "tr" failures.
+
+# Copyright (C) 1993, 1994, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
# ./tr a '[c*]b'
# ./tr -s abc zy
# ./tr abc zy
diff --git a/tests/tsort/basic-1 b/tests/tsort/basic-1
index f5287f2c3..4fe24f328 100755
--- a/tests/tsort/basic-1
+++ b/tests/tsort/basic-1
@@ -1,5 +1,24 @@
#!/bin/sh
# -*- perl -*-
+# Test "tsort".
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/unexpand/basic-1 b/tests/unexpand/basic-1
index 4f1dd17dc..3824d7c8b 100755
--- a/tests/unexpand/basic-1
+++ b/tests/unexpand/basic-1
@@ -1,4 +1,23 @@
#!/bin/sh
+# Test "unexpand".
+
+# Copyright (C) 2000, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
: ${PERL=perl}
: ${srcdir=.}
diff --git a/tests/uniq/Makefile.am b/tests/uniq/Makefile.am
index 052097d45..73f23a149 100644
--- a/tests/uniq/Makefile.am
+++ b/tests/uniq/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "uniq". -*-Makefile-*-
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = uniq
diff --git a/tests/uniq/Test.pm b/tests/uniq/Test.pm
index 259b16c37..26dd1e0ee 100644
--- a/tests/uniq/Test.pm
+++ b/tests/uniq/Test.pm
@@ -1,3 +1,23 @@
+# Test "uniq".
+
+# Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 Free
+# Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;
diff --git a/tests/wc/Makefile.am b/tests/wc/Makefile.am
index 312c1a8c4..be6e68027 100644
--- a/tests/wc/Makefile.am
+++ b/tests/wc/Makefile.am
@@ -1,4 +1,22 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-.
+# Make coreutils tests for "wc". -*-Makefile-*-
+
+# Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
##test-files-begin
x = wc
diff --git a/tests/wc/Test.pm b/tests/wc/Test.pm
index f73c30c2f..3adbbba5f 100755
--- a/tests/wc/Test.pm
+++ b/tests/wc/Test.pm
@@ -1,3 +1,22 @@
+# Test "wc".
+
+# Copyright (C) 1997, 2003, 2006 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
package Test;
require 5.002;
use strict;