summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-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
309 files changed, 5416 insertions, 25 deletions
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;