├── .gitattributes ├── .gitignore ├── .gitmodules ├── .mailmap ├── .prev-version ├── .vg-suppressions ├── AUTHORS ├── COPYING ├── ChangeLog-2005 ├── ChangeLog-2006 ├── ChangeLog-2007 ├── ChangeLog-2008 ├── HACKING ├── Makefile.am ├── NEWS ├── README ├── README-hacking ├── README-package-renamed-to-coreutils ├── README-prereq ├── README-release ├── README-valgrind ├── THANKS.in ├── THANKStt.in ├── TODO ├── bootstrap ├── bootstrap.conf ├── build-aux ├── ChangeLog-2007 ├── cvsu └── git-log-fix ├── cfg.mk ├── configure.ac ├── dist-check.mk ├── doc ├── .gitignore ├── ChangeLog-2007 ├── Makefile.am ├── coreutils.texi └── perm.texi ├── gl ├── lib │ ├── fadvise.c │ ├── fadvise.h │ ├── heap.c │ ├── heap.h │ ├── mbsalign.c │ ├── mbsalign.h │ ├── rand-isaac.c │ ├── rand-isaac.h │ ├── randint.c │ ├── randint.h │ ├── randperm.c │ ├── randperm.h │ ├── randread.c │ ├── randread.h │ ├── regcomp.c.diff │ ├── regex_internal.c.diff │ ├── regex_internal.h.diff │ ├── regexec.c.diff │ ├── root-dev-ino.c │ ├── root-dev-ino.h │ ├── tempname.c.diff │ └── tempname.h.diff ├── m4 │ └── root-dev-ino.m4 ├── modules │ ├── fadvise │ ├── fadvise-tests │ ├── heap │ ├── link-tests.diff │ ├── mbsalign │ ├── mbsalign-tests │ ├── randint │ ├── randperm │ ├── randread │ ├── randread-tests │ ├── rename-tests.diff │ ├── root-dev-ino │ └── tempname.diff └── tests │ ├── test-fadvise.c │ ├── test-mbsalign.c │ └── test-rand-isaac.c ├── gnulib-tests └── Makefile.am ├── lib ├── ChangeLog-2007 ├── Makefile.am ├── buffer-lcm.c ├── buffer-lcm.h ├── fd-reopen.c ├── fd-reopen.h ├── strintcmp.c ├── strnumcmp-in.h ├── strnumcmp.c ├── strnumcmp.h ├── t-chdir-long ├── xfts.c └── xfts.h ├── m4 ├── ChangeLog-2007 ├── boottime.m4 ├── check-decl.m4 ├── fd-reopen.m4 ├── gmp.m4 ├── include-exclude-prog.m4 ├── jm-macros.m4 ├── prereq.m4 ├── stat-prog.m4 ├── strnumcmp.m4 ├── xattr.m4 └── xfts.m4 ├── man ├── .gitignore ├── Makefile.am ├── arch.x ├── base64.x ├── basename.x ├── cat.x ├── chcon.x ├── chgrp.x ├── chmod.x ├── chown.x ├── chroot.x ├── cksum.x ├── comm.x ├── cp.x ├── csplit.x ├── cut.x ├── date.x ├── dd.x ├── df.x ├── dir.x ├── dircolors.x ├── dirname.x ├── du.x ├── echo.x ├── env.x ├── expand.x ├── expr.x ├── factor.x ├── false.x ├── fmt.x ├── fold.x ├── groups.x ├── head.x ├── help2man ├── hostid.x ├── hostname.x ├── id.x ├── install.x ├── join.x ├── kill.x ├── link.x ├── ln.x ├── logname.x ├── ls.x ├── md5sum.x ├── mkdir.x ├── mkfifo.x ├── mknod.x ├── mktemp.x ├── mv.x ├── nice.x ├── nl.x ├── nohup.x ├── nproc.x ├── od.x ├── paste.x ├── pathchk.x ├── pinky.x ├── pr.x ├── printenv.x ├── printf.x ├── ptx.x ├── pwd.x ├── readlink.x ├── realpath.x ├── rm.x ├── rmdir.x ├── runcon.x ├── seq.x ├── sha1sum.x ├── sha224sum.x ├── sha256sum.x ├── sha384sum.x ├── sha512sum.x ├── shred.x ├── shuf.x ├── sleep.x ├── sort.x ├── split.x ├── stat.x ├── stdbuf.x ├── stty.x ├── sum.x ├── sync.x ├── tac.x ├── tail.x ├── tee.x ├── test.x ├── timeout.x ├── touch.x ├── tr.x ├── true.x ├── truncate.x ├── tsort.x ├── tty.x ├── uname.x ├── unexpand.x ├── uniq.x ├── unlink.x ├── uptime.x ├── users.x ├── vdir.x ├── wc.x ├── who.x ├── whoami.x └── yes.x ├── old ├── fileutils │ ├── ChangeLog │ ├── ChangeLog-1997 │ └── NEWS ├── sh-utils │ ├── ChangeLog │ ├── ChangeLog.0 │ └── NEWS └── textutils │ ├── ChangeLog │ └── NEWS ├── po ├── ChangeLog-2007 └── POTFILES.in ├── scripts └── git-hooks │ ├── applypatch-msg │ ├── commit-msg │ ├── pre-applypatch │ └── pre-commit ├── src ├── .gitignore ├── Makefile.am ├── base64.c ├── basename.c ├── c99-to-c89.diff ├── cat.c ├── chcon.c ├── chgrp.c ├── chmod.c ├── chown-core.c ├── chown-core.h ├── chown.c ├── chroot.c ├── cksum.c ├── comm.c ├── copy.c ├── copy.h ├── cp-hash.c ├── cp-hash.h ├── cp.c ├── csplit.c ├── cut.c ├── date.c ├── dcgen ├── dd.c ├── df.c ├── dircolors.c ├── dircolors.hin ├── dirname.c ├── du-tests ├── du.c ├── echo.c ├── env.c ├── expand.c ├── expr.c ├── extent-scan.c ├── extent-scan.h ├── extract-magic ├── factor.c ├── false.c ├── fiemap.h ├── find-mount-point.c ├── find-mount-point.h ├── fmt.c ├── fold.c ├── getlimits.c ├── group-list.c ├── group-list.h ├── groups.c ├── head.c ├── hostid.c ├── hostname.c ├── id.c ├── install.c ├── ioblksize.h ├── join.c ├── kill.c ├── lbracket.c ├── libstdbuf.c ├── link.c ├── ln.c ├── logname.c ├── ls-dir.c ├── ls-ls.c ├── ls-vdir.c ├── ls.c ├── ls.h ├── md5sum.c ├── mkdir.c ├── mkfifo.c ├── mknod.c ├── mktemp.c ├── mv.c ├── nice.c ├── nl.c ├── nohup.c ├── nproc.c ├── od.c ├── operand2sig.c ├── operand2sig.h ├── paste.c ├── pathchk.c ├── pinky.c ├── pr.c ├── printenv.c ├── printf.c ├── prog-fprintf.c ├── prog-fprintf.h ├── ptx.c ├── pwd.c ├── readlink.c ├── realpath.c ├── relpath.c ├── relpath.h ├── remove.c ├── remove.h ├── rm.c ├── rmdir.c ├── runcon.c ├── seq.c ├── setuidgid.c ├── shred.c ├── shuf.c ├── sleep.c ├── sort.c ├── split.c ├── stat.c ├── stdbuf.c ├── stty.c ├── sum.c ├── sync.c ├── system.h ├── tac-pipe.c ├── tac.c ├── tail.c ├── tee.c ├── test.c ├── timeout.c ├── touch.c ├── tr.c ├── true.c ├── truncate.c ├── tsort.c ├── tty.c ├── uname-arch.c ├── uname-uname.c ├── uname.c ├── uname.h ├── unexpand.c ├── uniq.c ├── unlink.c ├── uptime.c ├── users.c ├── wc.c ├── wheel-gen.pl ├── who.c ├── whoami.c └── yes.c ├── tests ├── Coreutils.pm ├── CuSkip.pm ├── CuTmpdir.pm ├── Makefile.am ├── check.mk ├── chgrp │ ├── basic │ ├── default-no-deref │ ├── deref │ ├── no-x │ ├── posix-H │ └── recurse ├── chmod │ ├── c-option │ ├── equal-x │ ├── equals │ ├── inaccessible │ ├── no-x │ ├── octal │ ├── setgid │ ├── silent │ ├── thru-dangling │ ├── umask-x │ └── usage ├── chown │ ├── basic │ ├── deref │ ├── preserve-root │ └── separator ├── cp │ ├── abuse │ ├── acl │ ├── attr-existing │ ├── backup-1 │ ├── backup-dir │ ├── backup-is-src │ ├── capability │ ├── cp-HL │ ├── cp-a-selinux │ ├── cp-deref │ ├── cp-i │ ├── cp-mv-backup │ ├── cp-mv-enotsup-xattr │ ├── cp-parents │ ├── deref-slink │ ├── dir-rm-dest │ ├── dir-slash │ ├── dir-vs-file │ ├── existing-perm-dir │ ├── existing-perm-race │ ├── fail-perm │ ├── fiemap-2 │ ├── fiemap-empty │ ├── fiemap-perf │ ├── file-perm-race │ ├── into-self │ ├── link │ ├── link-heap │ ├── link-no-deref │ ├── link-preserve │ ├── link-symlink │ ├── nfs-removal-race │ ├── no-deref-link1 │ ├── no-deref-link2 │ ├── no-deref-link3 │ ├── parent-perm │ ├── parent-perm-race │ ├── perm │ ├── preserve-2 │ ├── preserve-gid │ ├── preserve-link │ ├── preserve-slink-time │ ├── proc-short-read │ ├── proc-zero-len │ ├── r-vs-symlink │ ├── reflink-auto │ ├── reflink-perm │ ├── same-file │ ├── slink-2-slink │ ├── sparse │ ├── sparse-fiemap │ ├── sparse-to-pipe │ ├── special-bits │ ├── special-f │ ├── src-base-dot │ ├── symlink-slash │ ├── thru-dangling │ └── trailing-slash ├── d_type-check ├── dd │ ├── bytes │ ├── direct │ ├── misc │ ├── nocache │ ├── not-rewound │ ├── reblock │ ├── skip-seek │ ├── skip-seek-past-dev │ ├── skip-seek-past-file │ ├── skip-seek2 │ ├── sparse │ ├── stderr │ ├── unblock │ └── unblock-sync ├── df │ ├── df-P │ ├── header │ ├── problematic-chars │ ├── total-unprocessed │ ├── total-verify │ └── unreadable ├── du │ ├── 2g │ ├── 8gb │ ├── basic │ ├── bigtime │ ├── deref │ ├── deref-args │ ├── exclude │ ├── fd-leak │ ├── files0-from │ ├── files0-from-dir │ ├── hard-link │ ├── inacc-dest │ ├── inacc-dir │ ├── inaccessible-cwd │ ├── long-from-unreadable │ ├── long-sloop │ ├── max-depth │ ├── move-dir-while-traversing │ ├── no-deref │ ├── no-x │ ├── one-file-system │ ├── restore-wd │ ├── slash │ ├── slink │ ├── trailing-slash │ └── two-args ├── envvar-check ├── fiemap-capable ├── filefrag-extent-compare ├── fmt │ ├── base │ ├── goal-option │ └── long-line ├── id │ ├── gnu-zero-uids │ └── no-context ├── init.cfg ├── init.sh ├── install │ ├── basic-1 │ ├── create-leading │ ├── d-slashdot │ ├── install-C │ ├── install-C-root │ ├── install-C-selinux │ ├── strip-program │ └── trap ├── lang-default ├── ln │ ├── backup-1 │ ├── hard-backup │ ├── hard-to-sym │ ├── misc │ ├── relative │ ├── sf-1 │ ├── slash-decorated-nonexistent-dest │ └── target-1 ├── ls │ ├── abmon-align │ ├── block-size │ ├── capability │ ├── color-clear-to-eol │ ├── color-dtype-dir │ ├── color-norm │ ├── dangle │ ├── dired │ ├── file-type │ ├── follow-slink │ ├── getxattr-speedup │ ├── infloop │ ├── inode │ ├── m-option │ ├── multihardlink │ ├── nameless-uid │ ├── no-arg │ ├── no-cap │ ├── proc-selinux-segfault │ ├── readdir-mountpoint-inode │ ├── recursive │ ├── root-rel-symlink-color │ ├── rt-1 │ ├── slink-acl │ ├── stat-dtype │ ├── stat-failed │ ├── stat-free-color │ ├── stat-free-symlinks │ ├── stat-vs-dirent │ ├── symlink-slash │ ├── time-style-diag │ └── x-option ├── misc │ ├── arch │ ├── base64 │ ├── basename │ ├── cat-buf │ ├── cat-proc │ ├── chcon │ ├── chcon-fail │ ├── chroot-credentials │ ├── chroot-fail │ ├── close-stdout │ ├── comm │ ├── csplit │ ├── csplit-1000 │ ├── csplit-heap │ ├── cut │ ├── date │ ├── date-next-dow │ ├── date-sec │ ├── dircolors │ ├── dirname │ ├── env │ ├── env-null │ ├── expand │ ├── expr │ ├── factor │ ├── false-status │ ├── fold │ ├── groups-dash │ ├── groups-version │ ├── head │ ├── head-c │ ├── head-elide-tail │ ├── head-pos │ ├── help-version │ ├── id-context │ ├── id-groups │ ├── id-setgid │ ├── invalid-opt │ ├── join │ ├── ls-misc │ ├── ls-time │ ├── md5sum │ ├── md5sum-bsd │ ├── md5sum-newline │ ├── md5sum-parallel │ ├── mknod │ ├── mktemp │ ├── nice │ ├── nice-fail │ ├── nl │ ├── nohup │ ├── nproc-avail │ ├── nproc-positive │ ├── od │ ├── od-N │ ├── od-float │ ├── od-multiple-t │ ├── od-x8 │ ├── paste │ ├── pathchk1 │ ├── pr │ ├── printenv │ ├── printf │ ├── printf-cov │ ├── printf-hex │ ├── printf-surprise │ ├── ptx │ ├── ptx-overrun │ ├── pwd-long │ ├── pwd-option │ ├── readlink-fp-loop │ ├── readlink-root │ ├── realpath │ ├── runcon-no-reorder │ ├── selinux │ ├── seq │ ├── seq-long-double │ ├── sha1sum │ ├── sha1sum-vec │ ├── sha224sum │ ├── sha256sum │ ├── sha384sum │ ├── sha512sum │ ├── shred-exact │ ├── shred-passes │ ├── shred-remove │ ├── shuf │ ├── sort │ ├── sort-NaN-infloop │ ├── sort-benchmark-random │ ├── sort-compress │ ├── sort-compress-hang │ ├── sort-compress-proc │ ├── sort-continue │ ├── sort-debug-keys │ ├── sort-debug-warn │ ├── sort-discrim │ ├── sort-exit-early │ ├── sort-files0-from │ ├── sort-float │ ├── sort-merge │ ├── sort-merge-fdlimit │ ├── sort-month │ ├── sort-rand │ ├── sort-spinlock-abuse │ ├── sort-stale-thread-mem │ ├── sort-unique │ ├── sort-unique-segv │ ├── sort-version │ ├── stat-birthtime │ ├── stat-fmt │ ├── stat-hyphen │ ├── stat-mount │ ├── stat-nanoseconds │ ├── stat-printf │ ├── stat-slash │ ├── stdbuf │ ├── stty │ ├── stty-invalid │ ├── stty-pairs │ ├── stty-row-col │ ├── sum │ ├── sum-sysv │ ├── tac │ ├── tac-2-nonseekable │ ├── tac-continue │ ├── tail │ ├── tee │ ├── tee-dash │ ├── test │ ├── test-diag │ ├── timeout │ ├── timeout-group │ ├── timeout-parameters │ ├── tr │ ├── tr-case-class │ ├── truncate-dangling-symlink │ ├── truncate-dir-fail │ ├── truncate-fail-diag │ ├── truncate-fifo │ ├── truncate-no-create-missing │ ├── truncate-overflow │ ├── truncate-owned-by-other │ ├── truncate-parameters │ ├── truncate-relative │ ├── tsort │ ├── tty-eof │ ├── unexpand │ ├── uniq │ ├── uniq-perf │ ├── wc │ ├── wc-files0 │ ├── wc-files0-from │ ├── wc-parallel │ ├── xattr │ └── xstrtol ├── mkdir │ ├── p-1 │ ├── p-2 │ ├── p-3 │ ├── p-slashdot │ ├── p-thru-slink │ ├── p-v │ ├── parents │ ├── perm │ ├── selinux │ ├── special-1 │ ├── t-slash │ └── writable-under-readonly ├── mv │ ├── acl │ ├── atomic │ ├── atomic2 │ ├── backup-dir │ ├── backup-is-src │ ├── childproof │ ├── diag │ ├── dir-file │ ├── dir2dir │ ├── dup-source │ ├── force │ ├── hard-2 │ ├── hard-3 │ ├── hard-4 │ ├── hard-link-1 │ ├── hard-verbose │ ├── i-1 │ ├── i-2 │ ├── i-3 │ ├── i-4 │ ├── i-5 │ ├── i-link-no │ ├── into-self │ ├── into-self-2 │ ├── into-self-3 │ ├── into-self-4 │ ├── leak-fd │ ├── mv-n │ ├── mv-special-1 │ ├── no-target-dir │ ├── part-fail │ ├── part-hardlink │ ├── part-rename │ ├── part-symlink │ ├── partition-perm │ ├── perm-1 │ ├── sticky-to-xpart │ ├── symlink-onto-hardlink │ ├── symlink-onto-hardlink-to-self │ ├── to-symlink │ ├── trailing-slash │ ├── update │ └── vfat ├── other-fs-tmpdir ├── pr │ ├── 0F │ ├── 0FF │ ├── 0FFnt │ ├── 0FFt │ ├── 0FnFnt │ ├── 0FnFt │ ├── 0Fnt │ ├── 0Ft │ ├── 2-S_f-t_notab │ ├── 2-Sf-t_notab │ ├── 2f-t_notab │ ├── 2s_f-t_notab │ ├── 2s_w60f-t_nota │ ├── 2sf-t_notab │ ├── 2sw60f-t_notab │ ├── 2w60f-t_notab │ ├── 3-0F │ ├── 3-5l24f-t │ ├── 3-FF │ ├── 3a2l17-FF │ ├── 3a3f-0F │ ├── 3a3l15-t │ ├── 3a3l15f-t │ ├── 3b2l17-FF │ ├── 3b3f-0F │ ├── 3b3f-0FF │ ├── 3b3f-FF │ ├── 3b3l15-t │ ├── 3b3l15f-t │ ├── 3f-0F │ ├── 3f-FF │ ├── 3l24-t │ ├── 3l24f-t │ ├── 3ml24-FF │ ├── 3ml24-t │ ├── 3ml24-t-FF │ ├── 3ml24f-t │ ├── 4-7l24-FF │ ├── 4l24-FF │ ├── FF │ ├── FFn │ ├── FFtn │ ├── FnFn │ ├── Ja3l24f-lm │ ├── Jb3l24f-lm │ ├── Jml24f-lm-lo │ ├── W-72l24f-ll │ ├── W20l24f-ll │ ├── W26l24f-ll │ ├── W27l24f-ll │ ├── W28l24f-ll │ ├── W35Ja3l24f-lm │ ├── W35Jb3l24f-lm │ ├── W35Jml24f-lmlo │ ├── W35a3l24f-lm │ ├── W35b3l24f-lm │ ├── W35ml24f-lm-lo │ ├── W72Jl24f-ll │ ├── a2l15-FF │ ├── a2l17-FF │ ├── a3-0F │ ├── a3f-0F │ ├── a3f-0FF │ ├── a3f-FF │ ├── a3l15-t │ ├── a3l15f-t │ ├── a3l24f-lm │ ├── b2l15-FF │ ├── b2l17-FF │ ├── b3-0F │ ├── b3f-0F │ ├── b3f-0FF │ ├── b3f-FF │ ├── b3l15-t │ ├── b3l15f-t │ ├── b3l24f-lm │ ├── l24-FF │ ├── l24-t │ ├── l24f-t │ ├── loli │ ├── ml20-FF-t │ ├── ml24-FF │ ├── ml24-t │ ├── ml24-t-FF │ ├── ml24f-0F │ ├── ml24f-lm-lo │ ├── ml24f-t │ ├── ml24f-t-0F │ ├── n+2-5l24f-0FF │ ├── n+2l24f-0FF │ ├── n+2l24f-bl │ ├── n+3-7l24-FF │ ├── n+3l24f-0FF │ ├── n+3l24f-bl │ ├── n+3ml20f-bl-FF │ ├── n+3ml24f-bl-tn │ ├── n+3ml24f-tn-bl │ ├── n+4-8a2l17-FF │ ├── n+4b2l17f-0FF │ ├── n+5-8b3l17f-FF │ ├── n+5a3l13f-0FF │ ├── n+6a2l17-FF │ ├── n+6b3l13f-FF │ ├── n+7l24-FF │ ├── n+8l20-FF │ ├── nJml24f-lmlmlo │ ├── nJml24f-lmlolm │ ├── nN1+3l24f-bl │ ├── nN15l24f-bl │ ├── nSml20-bl-FF │ ├── nSml20-t-t-FF │ ├── nSml20-t-tFFFF │ ├── nSml24-bl-FF │ ├── nSml24-t-t-FF │ ├── nSml24-t-tFFFF │ ├── nl24f-bl │ ├── o3Jml24f-lm-lo │ ├── o3a3Sl24f-tn │ ├── o3a3Snl24f-tn │ ├── o3a3l24f-tn │ ├── o3b3Sl24f-tn │ ├── o3b3Snl24f-tn │ ├── o3b3l24f-tn │ ├── o3mSl24f-bl-tn │ ├── o3mSnl24fbltn │ ├── o3ml24f-bl-tn │ ├── pr-tests │ ├── t-0FF │ ├── t-FF │ ├── t-bl │ ├── t-t │ ├── tFFn │ ├── tFFt │ ├── tFFt-bl │ ├── tFFt-ll │ ├── tFFt-lm │ ├── tFnFt │ ├── t_notab │ ├── t_tab │ ├── t_tab_ │ ├── ta3-0FF │ ├── ta3-FF │ ├── tb3-0FF │ ├── tb3-FF │ ├── tn │ ├── tn2e5o3-t_tab │ ├── tn2e8-t_tab │ ├── tn2e8o3-t_tab │ ├── tn_2e8-t_tab │ ├── tn_2e8S-t_tab │ ├── tne8-t_tab │ ├── tne8o3-t_tab │ ├── tt-0FF │ ├── tt-FF │ ├── tt-bl │ ├── tt-t │ ├── tta3-0FF │ ├── tta3-FF │ ├── ttb3-0FF │ ├── ttb3-FF │ └── w72l24f-ll ├── readlink │ ├── can-e │ ├── can-f │ ├── can-m │ └── rl-1 ├── rm │ ├── cycle │ ├── d-1 │ ├── d-2 │ ├── dangling-symlink │ ├── deep-1 │ ├── deep-2 │ ├── dir-no-w │ ├── dir-nonrecur │ ├── dot-rel │ ├── empty-inacc │ ├── empty-name │ ├── ext3-perf │ ├── f-1 │ ├── fail-2eperm │ ├── fail-eacces │ ├── fail-eperm │ ├── hash │ ├── i-1 │ ├── i-never │ ├── i-no-r │ ├── ignorable │ ├── inaccessible │ ├── interactive-always │ ├── interactive-once │ ├── ir-1 │ ├── isatty │ ├── many-dir-entries-vs-OOM │ ├── no-give-up │ ├── one-file-system │ ├── one-file-system2 │ ├── r-1 │ ├── r-2 │ ├── r-3 │ ├── r-4 │ ├── read-only │ ├── readdir-bug │ ├── rm1 │ ├── rm2 │ ├── rm3 │ ├── rm4 │ ├── rm5 │ ├── sunos-1 │ ├── unread2 │ ├── unread3 │ ├── unreadable │ └── v-slash ├── rmdir │ ├── fail-perm │ ├── ignore │ └── t-slash ├── sample-test ├── shell-or-perl ├── split │ ├── additional-suffix │ ├── b-chunk │ ├── fail │ ├── filter │ ├── guard-input │ ├── l-chunk │ ├── lines │ ├── numeric │ ├── r-chunk │ ├── suffix-auto-length │ └── suffix-length ├── tail-2 │ ├── F-vs-missing │ ├── F-vs-rename │ ├── append-only │ ├── assert │ ├── assert-2 │ ├── big-4gb │ ├── flush-initial │ ├── follow-name │ ├── follow-stdin │ ├── infloop-1 │ ├── inotify-hash-abuse │ ├── inotify-hash-abuse2 │ ├── inotify-race │ ├── inotify-rotate │ ├── pid │ ├── pipe-f │ ├── pipe-f2 │ ├── proc-ksyms │ ├── start-middle │ ├── tail-n0f │ └── wait └── touch │ ├── 60-seconds │ ├── dangling-symlink │ ├── dir-1 │ ├── empty-file │ ├── fail-diag │ ├── fifo │ ├── no-create-missing │ ├── no-dereference │ ├── no-rights │ ├── not-owner │ ├── now-owned-by-other │ ├── obsolescent │ ├── read-only │ ├── relative │ └── trailing-slash └── thanks-gen /.gitattributes: -------------------------------------------------------------------------------- 1 | *.texi* diff=texinfo 2 | 3 | # Put something like the following e.g., in your ~/.gitconfig file 4 | # # Include proper "function name" string in diffs of texinfo. 5 | # # Derived from the regexp in emacs' lisp/add-log.el. 6 | # [diff "texinfo"] 7 | # funcname = "^@node[ \t][ \t]*\\([^,][^,]*\\)" 8 | 9 | gl/lib/*.diff -whitespace 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "gnulib"] 2 | path = gnulib 3 | url = git://git.sv.gnu.org/gnulib.git 4 | -------------------------------------------------------------------------------- /.prev-version: -------------------------------------------------------------------------------- 1 | 8.18 2 | -------------------------------------------------------------------------------- /README-package-renamed-to-coreutils: -------------------------------------------------------------------------------- 1 | As of 2002-09-01, the GNU fileutils, textutils, and sh-utils 2 | packages have been merged into one, called the GNU coreutils. 3 | See http://www.gnu.org/software/coreutils/ for a description. 4 | Here's the FAQ list: 5 | 6 | http://www.gnu.org/software/coreutils/faq/ 7 | 8 | For information on the mailing lists associated with the 9 | coreutils package, see these: 10 | 11 | http://mail.gnu.org/mailman/listinfo/coreutils-announce 12 | http://mail.gnu.org/mailman/listinfo/bug-coreutils 13 | http://mail.gnu.org/mailman/listinfo/coreutils 14 | 15 | mailing list archives are here: 16 | 17 | http://news.gmane.org/gmane.comp.gnu.coreutils.announce 18 | http://news.gmane.org/gmane.comp.gnu.core-utils.bugs (up to the minute) 19 | http://mail.gnu.org/pipermail/bug-coreutils/ (updated every 12 hours) 20 | http://news.gmane.org/gmane.comp.gnu.coreutils.general 21 | http://mail.gnu.org/pipermail/coreutils/ (updated every 12 hours) 22 | -------------------------------------------------------------------------------- /THANKStt.in: -------------------------------------------------------------------------------- 1 | The following teams have translated the many diagnostics of this 2 | package into many different languages. Thank you! 3 | 4 | --- 5 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | /constants.texi 2 | /coreutils.aux 3 | /coreutils.cp 4 | /coreutils.cps 5 | /coreutils.dvi 6 | /coreutils.fl 7 | /coreutils.fn 8 | /coreutils.html 9 | /coreutils.info 10 | /coreutils.ky 11 | /coreutils.log 12 | /coreutils.op 13 | /coreutils.pdf 14 | /coreutils.pg 15 | /coreutils.toc 16 | /coreutils.tp 17 | /coreutils.vr 18 | /fdl.texi 19 | /gendocs_template 20 | /parse-datetime.texi 21 | /stamp-vti 22 | /version.texi 23 | -------------------------------------------------------------------------------- /gl/lib/heap.h: -------------------------------------------------------------------------------- 1 | /* Barebones heap implementation supporting only insert and pop. 2 | 3 | Copyright (C) 2010-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Full implementation: GDSL (http://gna.org/projects/gdsl/) by Nicolas 19 | Darnis . Adapted by Gene Auyeung. */ 20 | 21 | #include 22 | 23 | struct heap *heap_alloc (int (*) (void const *, void const *), size_t); 24 | void heap_free (struct heap *); 25 | int heap_insert (struct heap *heap, void *item); 26 | void *heap_remove_top (struct heap *heap); 27 | -------------------------------------------------------------------------------- /gl/lib/randperm.h: -------------------------------------------------------------------------------- 1 | #include "randint.h" 2 | #include 3 | size_t randperm_bound (size_t, size_t) _GL_ATTRIBUTE_CONST; 4 | size_t *randperm_new (struct randint_source *, size_t, size_t); 5 | -------------------------------------------------------------------------------- /gl/lib/regex_internal.c.diff: -------------------------------------------------------------------------------- 1 | diff --git a/lib/regex_internal.c b/lib/regex_internal.c 2 | index 7e8c1bc..e68c9da 100644 3 | --- a/lib/regex_internal.c 4 | +++ b/lib/regex_internal.c 5 | @@ -16,6 +16,8 @@ 6 | You should have received a copy of the GNU General Public License along 7 | with this program; if not, see . */ 8 | 9 | +#include "verify.h" 10 | +#include "intprops.h" 11 | static void re_string_construct_common (const char *str, Idx len, 12 | re_string_t *pstr, 13 | RE_TRANSLATE_TYPE trans, bool icase, 14 | @@ -1393,7 +1395,10 @@ static void 15 | internal_function 16 | re_node_set_remove_at (re_node_set *set, Idx idx) 17 | { 18 | - if (idx < 0 || idx >= set->nelem) 19 | + verify (! TYPE_SIGNED (Idx)); 20 | + /* if (idx < 0) 21 | + return; */ 22 | + if (idx >= set->nelem) 23 | return; 24 | --set->nelem; 25 | for (; idx < set->nelem; idx++) 26 | -------------------------------------------------------------------------------- /gl/lib/regex_internal.h.diff: -------------------------------------------------------------------------------- 1 | diff --git a/lib/regex_internal.h b/lib/regex_internal.h 2 | index 2b9f697..7f4e349 100644 3 | --- a/lib/regex_internal.h 4 | +++ b/lib/regex_internal.h 5 | @@ -823,7 +823,8 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx) 6 | # ifndef NOT_IN_libc 7 | static int 8 | internal_function __attribute ((pure)) 9 | -re_string_elem_size_at (const re_string_t *pstr, Idx idx) 10 | +re_string_elem_size_at (const re_string_t *pstr _UNUSED_PARAMETER_, 11 | + Idx idx _UNUSED_PARAMETER_) 12 | { 13 | # ifdef _LIBC 14 | const unsigned char *p, *extra; 15 | -------------------------------------------------------------------------------- /gl/lib/tempname.h.diff: -------------------------------------------------------------------------------- 1 | diff --git a/lib/tempname.h b/lib/tempname.h 2 | index 7972562..7ced9a9 100644 3 | --- a/lib/tempname.h 4 | +++ b/lib/tempname.h 5 | @@ -46,5 +46,7 @@ 6 | 7 | We use a clever algorithm to get hard-to-predict names. */ 8 | extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); 9 | +extern int gen_tempname_len (char *tmpl, int suffixlen, int flags, int kind, 10 | + size_t x_suffix_len); 11 | 12 | #endif /* GL_TEMPNAME_H */ 13 | -------------------------------------------------------------------------------- /gl/m4/root-dev-ino.m4: -------------------------------------------------------------------------------- 1 | #serial 3 2 | dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_ROOT_DEV_INO], 8 | [ 9 | AC_LIBOBJ([root-dev-ino]) 10 | 11 | dnl Prerequisites 12 | AC_REQUIRE([AC_FUNC_LSTAT]) 13 | : 14 | ]) 15 | -------------------------------------------------------------------------------- /gl/modules/fadvise: -------------------------------------------------------------------------------- 1 | Description: 2 | Declare an access pattern hint for files. 3 | 4 | Files: 5 | lib/fadvise.c 6 | lib/fadvise.h 7 | 8 | Depends-on: 9 | ignore-value 10 | 11 | configure.ac: 12 | AC_CHECK_FUNCS_ONCE([posix_fadvise]) 13 | 14 | Makefile.am: 15 | lib_SOURCES += fadvise.c fadvise.h 16 | 17 | Include: 18 | "fadvise.h" 19 | 20 | License: 21 | LGPL 22 | 23 | Maintainer: 24 | Pádraig Brady 25 | -------------------------------------------------------------------------------- /gl/modules/fadvise-tests: -------------------------------------------------------------------------------- 1 | Files: 2 | tests/test-fadvise.c 3 | 4 | Depends-on: 5 | 6 | configure.ac: 7 | 8 | Makefile.am: 9 | TESTS += test-fadvise 10 | check_PROGRAMS += test-fadvise 11 | -------------------------------------------------------------------------------- /gl/modules/heap: -------------------------------------------------------------------------------- 1 | Description: 2 | Binary heap with minimal number of methods. Used in sort. 3 | 4 | Files: 5 | lib/heap.c 6 | lib/heap.h 7 | 8 | Depends-on: 9 | stdlib-safer 10 | xalloc 11 | 12 | configure.ac: 13 | 14 | Makefile.am: 15 | lib_SOURCES += heap.c heap.h 16 | 17 | Include: 18 | "heap.h" 19 | 20 | License: 21 | GPL 22 | 23 | Maintainer: 24 | Gene Auyeung 25 | -------------------------------------------------------------------------------- /gl/modules/link-tests.diff: -------------------------------------------------------------------------------- 1 | diff --git a/modules/link-tests b/modules/link-tests 2 | index 5b1978e..039e97f 100644 3 | --- a/modules/link-tests 4 | +++ b/modules/link-tests 5 | @@ -15,3 +15,4 @@ configure.ac: 6 | Makefile.am: 7 | TESTS += test-link 8 | check_PROGRAMS += test-link 9 | +test_link_LDADD = $(LDADD) @LIBINTL@ 10 | -------------------------------------------------------------------------------- /gl/modules/mbsalign: -------------------------------------------------------------------------------- 1 | Description: 2 | Align/Truncate a string in a given screen width. 3 | 4 | Files: 5 | lib/mbsalign.c 6 | lib/mbsalign.h 7 | 8 | Depends-on: 9 | wchar 10 | wctype 11 | wcwidth 12 | mempcpy 13 | stdint 14 | 15 | configure.ac: 16 | 17 | Makefile.am: 18 | lib_SOURCES += mbsalign.c mbsalign.h 19 | 20 | Include: 21 | "mbsalign.h" 22 | 23 | License: 24 | LGPL 25 | 26 | Maintainer: 27 | Pádraig Brady 28 | -------------------------------------------------------------------------------- /gl/modules/mbsalign-tests: -------------------------------------------------------------------------------- 1 | Files: 2 | tests/test-mbsalign.c 3 | tests/macros.h 4 | 5 | Depends-on: 6 | 7 | configure.ac: 8 | 9 | Makefile.am: 10 | TESTS += test-mbsalign 11 | check_PROGRAMS += test-mbsalign 12 | -------------------------------------------------------------------------------- /gl/modules/randint: -------------------------------------------------------------------------------- 1 | Description: 2 | Generate random integers. 3 | 4 | Files: 5 | lib/randint.c 6 | lib/randint.h 7 | 8 | Depends-on: 9 | inline 10 | randread 11 | 12 | configure.ac: 13 | 14 | Makefile.am: 15 | lib_SOURCES += randint.c randint.h 16 | 17 | Include: 18 | "randint.h" 19 | 20 | License: 21 | GPL 22 | 23 | Maintainer: 24 | Paul Eggert 25 | -------------------------------------------------------------------------------- /gl/modules/randperm: -------------------------------------------------------------------------------- 1 | Description: 2 | Generate random permutations. 3 | 4 | Files: 5 | lib/randperm.c 6 | lib/randperm.h 7 | 8 | Depends-on: 9 | randint 10 | xalloc 11 | hash 12 | 13 | configure.ac: 14 | 15 | Makefile.am: 16 | lib_SOURCES += randperm.c randperm.h 17 | 18 | Include: 19 | "randperm.h" 20 | 21 | License: 22 | GPL 23 | 24 | Maintainer: 25 | Paul Eggert 26 | -------------------------------------------------------------------------------- /gl/modules/randread: -------------------------------------------------------------------------------- 1 | Description: 2 | Generate buffers of random data. 3 | 4 | Files: 5 | lib/rand-isaac.c 6 | lib/rand-isaac.h 7 | lib/randread.c 8 | lib/randread.h 9 | 10 | Depends-on: 11 | error 12 | exitfail 13 | inline 14 | fopen-safer 15 | gettimeofday 16 | quotearg 17 | stdalign 18 | stdbool 19 | stdint 20 | unlocked-io 21 | xalloc 22 | 23 | configure.ac: 24 | 25 | Makefile.am: 26 | lib_SOURCES += randread.c randread.h rand-isaac.c rand-isaac.h 27 | 28 | Include: 29 | "randread.h" 30 | 31 | License: 32 | GPL 33 | 34 | Maintainer: 35 | Paul Eggert 36 | -------------------------------------------------------------------------------- /gl/modules/randread-tests: -------------------------------------------------------------------------------- 1 | Files: 2 | tests/test-rand-isaac.c 3 | tests/macros.h 4 | 5 | Depends-on: 6 | 7 | configure.ac: 8 | 9 | Makefile.am: 10 | TESTS += test-rand-isaac 11 | check_PROGRAMS += test-rand-isaac 12 | -------------------------------------------------------------------------------- /gl/modules/rename-tests.diff: -------------------------------------------------------------------------------- 1 | diff --git a/modules/rename-tests b/modules/rename-tests 2 | index b3cd973..898d18b 100644 3 | --- a/modules/rename-tests 4 | +++ b/modules/rename-tests 5 | @@ -20,3 +20,4 @@ configure.ac: 6 | Makefile.am: 7 | TESTS += test-rename 8 | check_PROGRAMS += test-rename 9 | +test_rename_LDADD = $(LDADD) @LIBINTL@ 10 | -------------------------------------------------------------------------------- /gl/modules/root-dev-ino: -------------------------------------------------------------------------------- 1 | Description: 2 | Root device and inode number checking. 3 | 4 | Files: 5 | lib/root-dev-ino.h 6 | lib/root-dev-ino.c 7 | m4/root-dev-ino.m4 8 | 9 | Depends-on: 10 | dev-ino 11 | same-inode 12 | 13 | configure.ac: 14 | gl_ROOT_DEV_INO 15 | 16 | Makefile.am: 17 | 18 | Include: 19 | "root-dev-ino.h" 20 | 21 | License: 22 | GPL 23 | 24 | Maintainer: 25 | Jim Meyering 26 | -------------------------------------------------------------------------------- /gl/modules/tempname.diff: -------------------------------------------------------------------------------- 1 | diff --git a/modules/tempname b/modules/tempname 2 | index b4708d9..e003c41 100644 3 | --- a/modules/tempname 4 | +++ b/modules/tempname 5 | @@ -1,5 +1,5 @@ 6 | Description: 7 | -gen_tempname() function: create a private temporary file or directory. 8 | +gen_tempname, gen_tempname_len: create a private temporary file or directory. 9 | 10 | Files: 11 | lib/tempname.c 12 | @@ -11,6 +11,8 @@ extensions 13 | fcntl-h 14 | gettimeofday 15 | lstat 16 | +randint 17 | +stdbool 18 | stdint 19 | sys_stat 20 | sys_time 21 | -------------------------------------------------------------------------------- /gnulib-tests/Makefile.am: -------------------------------------------------------------------------------- 1 | include gnulib.mk 2 | 3 | AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS) 4 | 5 | # A few tests are inherently warning-evoking. 6 | # In the typical case where we use -Werror, exempt the few offenders. 7 | 8 | # test-xvasprintf.c: In function 'test_xasprintf': 9 | # test-xvasprintf.c:100: error: format not a string literal and no \ 10 | # format arguments [-Wformat-security] 11 | test_xvasprintf_CFLAGS = $(AM_CFLAGS) \ 12 | `test -n '$(WERROR_CFLAGS)' && echo ' -Wno-format-security'` 13 | 14 | # test-lock.c: In function 'lock_mutator_thread': 15 | # test-lock.c:148: error: cast from function call of type 'pthread_t' to \ 16 | # non-matching type 'void *' [-Wbad-function-cast] 17 | test_lock_CFLAGS = $(AM_CFLAGS) \ 18 | `test -n '$(WERROR_CFLAGS)' && echo ' -Wno-bad-function-cast'` 19 | test_tls_CFLAGS = $(AM_CFLAGS) \ 20 | `test -n '$(WERROR_CFLAGS)' && echo ' -Wno-bad-function-cast'` 21 | -------------------------------------------------------------------------------- /lib/buffer-lcm.h: -------------------------------------------------------------------------------- 1 | #include 2 | size_t buffer_lcm (size_t, size_t, size_t) _GL_ATTRIBUTE_CONST; 3 | -------------------------------------------------------------------------------- /lib/fd-reopen.h: -------------------------------------------------------------------------------- 1 | /* Invoke open, but return either a desired file descriptor or -1. 2 | 3 | Copyright (C) 2005-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Written by Paul Eggert. */ 19 | 20 | #include 21 | 22 | int fd_reopen (int, char const *, int, mode_t); 23 | -------------------------------------------------------------------------------- /lib/strintcmp.c: -------------------------------------------------------------------------------- 1 | /* Compare integer strings. 2 | 3 | Copyright (C) 2005-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Written by Paul Eggert. */ 19 | 20 | #include 21 | 22 | #include "strnumcmp-in.h" 23 | 24 | /* Compare strings A and B as integers without explicitly converting 25 | them to machine numbers, to avoid overflow problems and perhaps 26 | improve performance. */ 27 | 28 | int 29 | strintcmp (char const *a, char const *b) 30 | { 31 | return numcompare (a, b, -1, -1); 32 | } 33 | -------------------------------------------------------------------------------- /lib/strnumcmp.c: -------------------------------------------------------------------------------- 1 | /* Compare numeric strings. 2 | 3 | Copyright (C) 2005-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | /* Written by Paul Eggert. */ 19 | 20 | #include 21 | 22 | #include "strnumcmp-in.h" 23 | 24 | /* Externally-visible name for numcompare. */ 25 | 26 | int _GL_ATTRIBUTE_PURE 27 | strnumcmp (char const *a, char const *b, 28 | int decimal_point, int thousands_sep) 29 | { 30 | return numcompare (a, b, decimal_point, thousands_sep); 31 | } 32 | -------------------------------------------------------------------------------- /lib/strnumcmp.h: -------------------------------------------------------------------------------- 1 | int strintcmp (char const *, char const *) _GL_ATTRIBUTE_PURE; 2 | int strnumcmp (char const *, char const *, int, int); 3 | -------------------------------------------------------------------------------- /lib/xfts.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include "fts_.h" 3 | 4 | FTS * 5 | xfts_open (char * const *, int options, 6 | int (*) (const FTSENT **, const FTSENT **)); 7 | 8 | bool 9 | cycle_warning_required (FTS const *fts, FTSENT const *ent) 10 | _GL_ATTRIBUTE_PURE; 11 | -------------------------------------------------------------------------------- /m4/check-decl.m4: -------------------------------------------------------------------------------- 1 | #serial 26 2 | # Check declarations for this package. 3 | 4 | dnl Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | dnl This file is free software; the Free Software Foundation 7 | dnl gives unlimited permission to copy and/or distribute it, 8 | dnl with or without modifications, as long as this notice is preserved. 9 | 10 | 11 | dnl This is just a wrapper function to encapsulate this kludge. 12 | dnl Putting it in a separate file like this helps share it between 13 | dnl different packages. 14 | AC_DEFUN([gl_CHECK_DECLS], 15 | [ 16 | AC_REQUIRE([AC_HEADER_TIME]) 17 | 18 | AC_CHECK_HEADERS_ONCE([grp.h pwd.h]) 19 | headers=' 20 | #include 21 | 22 | #include 23 | 24 | #if HAVE_GRP_H 25 | # include 26 | #endif 27 | 28 | #if HAVE_PWD_H 29 | # include 30 | #endif 31 | ' 32 | AC_CHECK_DECLS([ 33 | getgrgid, 34 | getpwuid, 35 | ttyname], , , $headers) 36 | 37 | AC_CHECK_DECLS_ONCE([geteuid]) 38 | AC_CHECK_DECLS_ONCE([getlogin]) 39 | AC_CHECK_DECLS_ONCE([getuid]) 40 | ]) 41 | -------------------------------------------------------------------------------- /m4/fd-reopen.m4: -------------------------------------------------------------------------------- 1 | # Invoke open, but return either a desired file descriptor or -1. 2 | 3 | dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. 4 | 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | 9 | dnl Written by Paul Eggert. 10 | 11 | AC_DEFUN([gl_FD_REOPEN], 12 | [ 13 | AC_LIBSOURCES([fd-reopen.c, fd-reopen.h]) 14 | AC_LIBOBJ([fd-reopen]) 15 | ]) 16 | -------------------------------------------------------------------------------- /m4/strnumcmp.m4: -------------------------------------------------------------------------------- 1 | # Compare numeric strings. 2 | 3 | dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. 4 | 5 | dnl This file is free software; the Free Software Foundation 6 | dnl gives unlimited permission to copy and/or distribute it, 7 | dnl with or without modifications, as long as this notice is preserved. 8 | 9 | dnl Written by Paul Eggert. 10 | 11 | AC_DEFUN([gl_STRINTCMP], 12 | [ 13 | AC_LIBSOURCES([strintcmp.c, strnumcmp.h, strnumcmp-in.h]) 14 | AC_LIBOBJ([strintcmp]) 15 | 16 | dnl Prerequisites of lib/strintcmp.c. 17 | AC_REQUIRE([AC_INLINE]) 18 | ]) 19 | 20 | AC_DEFUN([gl_STRNUMCMP], 21 | [ 22 | AC_LIBSOURCES([strnumcmp.c, strnumcmp.h, strnumcmp-in.h]) 23 | AC_LIBOBJ([strnumcmp]) 24 | 25 | dnl Prerequisites of lib/strnumcmp.c. 26 | AC_REQUIRE([AC_INLINE]) 27 | ]) 28 | -------------------------------------------------------------------------------- /m4/xfts.m4: -------------------------------------------------------------------------------- 1 | #serial 1 2 | dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | AC_DEFUN([gl_FUNC_XFTS], 8 | [ 9 | AC_LIBSOURCES([xfts.c, xfts.h]) 10 | AC_LIBOBJ([xfts]) 11 | 12 | dnl Prerequisites of lib/xfts.c. 13 | : 14 | ]) 15 | -------------------------------------------------------------------------------- /man/arch.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | arch \- print machine hardware name (same as uname -m) 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | uname(1), uname(2) 7 | -------------------------------------------------------------------------------- /man/base64.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | base64 \- base64 encode/decode data and print to standard output 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/basename.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | basename \- strip directory and suffix from filenames 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | dirname(1), readlink(1) 7 | -------------------------------------------------------------------------------- /man/cat.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | cat \- concatenate files and print on the standard output 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | \fBtac\fP(1) 7 | -------------------------------------------------------------------------------- /man/chcon.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | chcon \- change file security context 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/chgrp.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | chgrp \- change group ownership 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/chroot.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | chroot \- run command or interactive shell with special root directory 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | chroot(2) 7 | -------------------------------------------------------------------------------- /man/cksum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | cksum \- checksum and count the bytes in a file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/comm.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | comm \- compare two sorted files line by line 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | join(1), uniq(1) 7 | -------------------------------------------------------------------------------- /man/cp.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | cp \- copy files and directories 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/csplit.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | csplit \- split a file into sections determined by context lines 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/cut.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | cut \- remove sections from each line of files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/date.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | date \- print or set the system date and time 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [DATE STRING] 6 | .\" NOTE: keep this paragraph in sync with the one in touch.x 7 | The --date=STRING is a mostly free format human readable date string 8 | such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or 9 | even "next Thursday". A date string may contain items indicating 10 | calendar date, time of day, time zone, day of week, relative time, 11 | relative date, and numbers. An empty string indicates the beginning 12 | of the day. The date string format is more complex than is easily 13 | documented here but is fully described in the info documentation. 14 | -------------------------------------------------------------------------------- /man/dd.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | dd \- convert and copy a file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/dir.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | dir \- list directory contents 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/dircolors.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | dircolors \- color setup for ls 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/dirname.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | dirname \- strip last component from file name 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | basename(1), readlink(1) 7 | -------------------------------------------------------------------------------- /man/du.x: -------------------------------------------------------------------------------- 1 | '\" Copyright (C) 1998-2012 Free Software Foundation, Inc. 2 | '\" 3 | '\" This is free software. You may redistribute copies of it under the terms 4 | '\" of the GNU General Public License . 5 | '\" There is NO WARRANTY, to the extent permitted by law. 6 | [NAME] 7 | du \- estimate file space usage 8 | [DESCRIPTION] 9 | .\" Add any additional description here 10 | [PATTERNS] 11 | PATTERN is a shell pattern (not a regular expression). The pattern 12 | .BR ? 13 | matches any one character, whereas 14 | .BR * 15 | matches any string (composed of zero, one or multiple characters). For 16 | example, 17 | .BR *.o 18 | will match any files whose names end in 19 | .BR .o . 20 | Therefore, the command 21 | .IP 22 | .B du --exclude=\(aq*.o\(aq 23 | .PP 24 | will skip all files and subdirectories ending in 25 | .BR .o 26 | (including the file 27 | .BR .o 28 | itself). 29 | -------------------------------------------------------------------------------- /man/echo.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | echo \- display a line of text 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/env.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | env \- run a program in a modified environment 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/expand.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | expand \- convert tabs to spaces 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | unexpand(1) 7 | -------------------------------------------------------------------------------- /man/expr.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | expr \- evaluate expressions 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/factor.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | factor \- factor numbers 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/false.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | false \- do nothing, unsuccessfully 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/fmt.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | fmt \- simple optimal text formatter 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/fold.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | fold \- wrap each input line to fit in specified width 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/groups.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | groups \- print the groups a user is in 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/head.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | head \- output the first part of files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/hostid.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | hostid \- print the numeric identifier for the current host 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | gethostid(3) 7 | -------------------------------------------------------------------------------- /man/hostname.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | hostname \- set or print the name of the current host system 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/id.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | id \- print real and effective user and group IDs 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/install.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | install \- copy files and set attributes 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/join.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | join \- join lines of two files on a common field 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | comm(1), uniq(1) 7 | -------------------------------------------------------------------------------- /man/kill.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | kill \- send signals to processes, or list signals 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | kill(2) 7 | -------------------------------------------------------------------------------- /man/link.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | link \- call the link function to create a link to a file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | link(2) 7 | -------------------------------------------------------------------------------- /man/ln.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | ln \- make links between files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | link(2), symlink(2) 7 | -------------------------------------------------------------------------------- /man/logname.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | logname \- print user\'s login name 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/ls.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | ls \- list directory contents 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/md5sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | md5sum \- compute and check MD5 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [BUGS] 6 | The MD5 algorithm should not be used any more for security related purposes. 7 | Instead, better use an SHA\-2 algorithm, implemented in the programs 8 | sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1) 9 | -------------------------------------------------------------------------------- /man/mkdir.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | mkdir \- make directories 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | mkdir(2) 7 | -------------------------------------------------------------------------------- /man/mkfifo.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | mkfifo \- make FIFOs (named pipes) 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | mkfifo(3) 7 | -------------------------------------------------------------------------------- /man/mknod.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | mknod \- make block or character special files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | mknod(2) 7 | -------------------------------------------------------------------------------- /man/mktemp.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | mktemp \- create a temporary file or directory 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | mkstemp(3), mkdtemp(3), mktemp(3) 7 | -------------------------------------------------------------------------------- /man/mv.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | mv \- move (rename) files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | rename(2) 7 | -------------------------------------------------------------------------------- /man/nice.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | nice \- run a program with modified scheduling priority 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | nice(2) 7 | -------------------------------------------------------------------------------- /man/nl.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | nl \- number lines of files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/nohup.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | nohup \- run a command immune to hangups, with output to a non-tty 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/nproc.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | nproc \- print the number of processing units available 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/od.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | od \- dump files in octal and other formats 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/paste.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | paste \- merge lines of files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/pathchk.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | pathchk \- check whether file names are valid or portable 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/pinky.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | pinky \- lightweight finger 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/pr.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | pr \- convert text files for printing 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/printenv.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | printenv \- print all or part of environment 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/printf.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | printf \- format and print data 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | printf(3) 7 | -------------------------------------------------------------------------------- /man/ptx.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | ptx \- produce a permuted index of file contents 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/pwd.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | pwd \- print name of current/working directory 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | getcwd(3) 7 | -------------------------------------------------------------------------------- /man/readlink.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | readlink \- print value of a symbolic link or canonical file name 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | readlink(2) 7 | -------------------------------------------------------------------------------- /man/realpath.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | realpath \- print the resolved path 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | readlink(1), readlink(2), realpath(3) 7 | -------------------------------------------------------------------------------- /man/rmdir.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | rmdir \- remove empty directories 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | rmdir(2) 7 | -------------------------------------------------------------------------------- /man/runcon.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | runcon \- run command with specified security context 3 | [DESCRIPTION] 4 | Run COMMAND with completely-specified CONTEXT, or with current or 5 | transitioned security context modified by one or more of LEVEL, 6 | ROLE, TYPE, and USER. 7 | .PP 8 | If none of \fI-c\fR, \fI-t\fR, \fI-u\fR, \fI-r\fR, or \fI-l\fR, is specified, 9 | the first argument is used as the complete context. Any additional 10 | arguments after \fICOMMAND\fR are interpreted as arguments to the 11 | command. 12 | .PP 13 | Note that only carefully-chosen contexts are likely to successfully 14 | run. 15 | -------------------------------------------------------------------------------- /man/seq.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | seq \- print a sequence of numbers 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sha1sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sha1sum \- compute and check SHA1 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sha224sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sha224sum \- compute and check SHA224 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sha256sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sha256sum \- compute and check SHA256 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sha384sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sha384sum \- compute and check SHA384 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sha512sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sha512sum \- compute and check SHA512 message digest 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/shred.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | shred \- overwrite a file to hide its contents, and optionally delete it 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/shuf.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | shuf \- generate random permutations 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sleep.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sleep \- delay for a specified amount of time 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | sleep(3) 7 | -------------------------------------------------------------------------------- /man/sort.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sort \- sort lines of text files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | uniq(1) 7 | -------------------------------------------------------------------------------- /man/split.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | split \- split a file into pieces 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/stat.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | stat \- display file or file system status 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | stat(2) 7 | -------------------------------------------------------------------------------- /man/stdbuf.x: -------------------------------------------------------------------------------- 1 | '\" Copyright (C) 2009-2012 Free Software Foundation, Inc. 2 | '\" 3 | '\" This is free software. You may redistribute copies of it under the terms 4 | '\" of the GNU General Public License . 5 | '\" There is NO WARRANTY, to the extent permitted by law. 6 | [NAME] 7 | stdbuf \- 8 | Run COMMAND, with modified buffering operations for its standard streams. 9 | [DESCRIPTION] 10 | .\" Add any additional description here 11 | [EXAMPLES] 12 | .B tail -f access.log | stdbuf -oL cut -d \(aq \(aq -f1 | uniq 13 | .br 14 | This will immedidately display unique entries from access.log 15 | [BUGS] 16 | On GLIBC platforms, specifying a buffer size, i.e. using fully buffered mode 17 | will result in undefined operation. 18 | -------------------------------------------------------------------------------- /man/stty.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | stty \- change and print terminal line settings 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sum.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sum \- checksum and count the blocks in a file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/sync.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | sync \- flush file system buffers 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | sync(2) 7 | -------------------------------------------------------------------------------- /man/tac.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tac \- concatenate and print files in reverse 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | \fBrev\fP(1) 7 | -------------------------------------------------------------------------------- /man/tail.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tail \- output the last part of files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/tee.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tee \- read from standard input and write to standard output and files 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/test.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | test \- check file types and compare values 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/timeout.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | timeout \- run a command with a time limit 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | kill(1) 7 | [BUGS] 8 | Some platforms don't curently support timeouts beyond 2038 9 | -------------------------------------------------------------------------------- /man/touch.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | touch \- change file timestamps 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [DATE STRING] 6 | .\" NOTE: keep this paragraph in sync with the one in date.x 7 | The --date=STRING is a mostly free format human readable date string 8 | such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or 9 | even "next Thursday". A date string may contain items indicating 10 | calendar date, time of day, time zone, day of week, relative time, 11 | relative date, and numbers. An empty string indicates the beginning 12 | of the day. The date string format is more complex than is easily 13 | documented here but is fully described in the info documentation. 14 | -------------------------------------------------------------------------------- /man/tr.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tr \- translate or delete characters 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/true.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | true \- do nothing, successfully 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/truncate.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | truncate \- shrink or extend the size of a file to the specified size 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | dd(1), truncate(2), ftruncate(2) 7 | -------------------------------------------------------------------------------- /man/tsort.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tsort \- perform topological sort 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/tty.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | tty \- print the file name of the terminal connected to standard input 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/uname.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | uname \- print system information 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | arch(1), uname(2) 7 | -------------------------------------------------------------------------------- /man/unexpand.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | unexpand \- convert spaces to tabs 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | expand(1) 7 | -------------------------------------------------------------------------------- /man/uniq.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | uniq \- report or omit repeated lines 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | comm(1), join(1), sort(1) 7 | -------------------------------------------------------------------------------- /man/unlink.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | unlink \- call the unlink function to remove the specified file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | [SEE ALSO] 6 | unlink(2) 7 | -------------------------------------------------------------------------------- /man/uptime.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | uptime \- tell how long the system has been running 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/users.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | users \- print the user names of users currently logged in to the current host 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/vdir.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | vdir \- list directory contents 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/wc.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | wc \- print newline, word, and byte counts for each file 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/who.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | who \- show who is logged on 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/whoami.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | whoami \- print effective userid 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /man/yes.x: -------------------------------------------------------------------------------- 1 | [NAME] 2 | yes \- output a string repeatedly until killed 3 | [DESCRIPTION] 4 | .\" Add any additional description here 5 | -------------------------------------------------------------------------------- /scripts/git-hooks/applypatch-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | test -x "$GIT_DIR/hooks/commit-msg" && 14 | exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /scripts/git-hooks/pre-applypatch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | test -x "$GIT_DIR/hooks/pre-commit" && 13 | exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /src/cp-hash.h: -------------------------------------------------------------------------------- 1 | void hash_init (void); 2 | void forget_all (void); 3 | void forget_created (ino_t ino, dev_t dev); 4 | char *remember_copied (const char *node, ino_t ino, dev_t dev); 5 | char *src_to_dest_lookup (ino_t ino, dev_t dev); 6 | -------------------------------------------------------------------------------- /src/false.c: -------------------------------------------------------------------------------- 1 | #define EXIT_STATUS EXIT_FAILURE 2 | #include "true.c" 3 | -------------------------------------------------------------------------------- /src/find-mount-point.h: -------------------------------------------------------------------------------- 1 | /* find-mount-point.h -- find the root mount point for a file. 2 | Copyright (C) 2010-2012 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | extern char *find_mount_point (char const *, struct stat const *); 18 | -------------------------------------------------------------------------------- /src/group-list.h: -------------------------------------------------------------------------------- 1 | /* group-list.h -- prototypes shared by id and groups. 2 | 3 | Copyright (C) 2008-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | bool print_group (gid_t, bool); 19 | bool print_group_list (const char *, uid_t, gid_t, gid_t, bool); 20 | -------------------------------------------------------------------------------- /src/lbracket.c: -------------------------------------------------------------------------------- 1 | #define LBRACKET 1 2 | #include "test.c" 3 | -------------------------------------------------------------------------------- /src/ls-dir.c: -------------------------------------------------------------------------------- 1 | #include "ls.h" 2 | int ls_mode = LS_MULTI_COL; 3 | -------------------------------------------------------------------------------- /src/ls-ls.c: -------------------------------------------------------------------------------- 1 | #include "ls.h" 2 | int ls_mode = LS_LS; 3 | -------------------------------------------------------------------------------- /src/ls-vdir.c: -------------------------------------------------------------------------------- 1 | #include "ls.h" 2 | int ls_mode = LS_LONG_FORMAT; 3 | -------------------------------------------------------------------------------- /src/ls.h: -------------------------------------------------------------------------------- 1 | /* This is for the 'ls' program. */ 2 | #define LS_LS 1 3 | 4 | /* This is for the 'dir' program. */ 5 | #define LS_MULTI_COL 2 6 | 7 | /* This is for the 'vdir' program. */ 8 | #define LS_LONG_FORMAT 3 9 | 10 | extern int ls_mode; 11 | -------------------------------------------------------------------------------- /src/operand2sig.h: -------------------------------------------------------------------------------- 1 | /* operand2sig.h -- prototype for signal specification function 2 | 3 | Copyright (C) 2008-2012 Free Software Foundation, Inc. 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . */ 17 | 18 | extern int operand2sig (char const *operand, char *signame); 19 | -------------------------------------------------------------------------------- /src/prog-fprintf.h: -------------------------------------------------------------------------------- 1 | /* prog-fprintf.h - common formating output functions and definitions 2 | Copyright (C) 2008-2012 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | #ifndef PROG_FPRINTF_H 18 | # define PROG_FPRINTF_H 19 | 20 | # include 21 | 22 | extern void prog_fprintf (FILE *fp, char const *fmt, ...) 23 | __attribute__ ((__format__ (__printf__, 2, 3))); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/relpath.h: -------------------------------------------------------------------------------- 1 | /* relpath - print the relative path 2 | Copyright (C) 2012 Free Software Foundation, Inc. 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . */ 16 | 17 | /* Written by Pádraig Brady. */ 18 | 19 | #ifndef _RELPATH_H 20 | # define _RELPATH_H 21 | 22 | extern bool 23 | relpath (const char *can_fname, const char *can_reldir, char *buf, size_t len); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/uname-arch.c: -------------------------------------------------------------------------------- 1 | #include "uname.h" 2 | int uname_mode = UNAME_ARCH; 3 | -------------------------------------------------------------------------------- /src/uname-uname.c: -------------------------------------------------------------------------------- 1 | #include "uname.h" 2 | int uname_mode = UNAME_UNAME; 3 | -------------------------------------------------------------------------------- /src/uname.h: -------------------------------------------------------------------------------- 1 | /* This is for the 'uname' program. */ 2 | #define UNAME_UNAME 1 3 | 4 | /* This is for the 'arch' program. */ 5 | #define UNAME_ARCH 2 6 | 7 | extern int uname_mode; 8 | -------------------------------------------------------------------------------- /tests/chgrp/default-no-deref: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that chgrp -R does not dereference symlinks. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chgrp 21 | require_membership_in_two_groups_ 22 | 23 | set _ $groups; shift 24 | g2=$2 25 | 26 | mkdir d && touch f && ln -s ../f d/s || framework_failure_ 27 | 28 | 29 | g_init=$(stat --printf=%g f) 30 | chgrp -R $g2 d || fail=1 31 | test $(stat --printf=%g f) = $g_init || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/chmod/equal-x: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "chmod =x" and the like. 3 | 4 | # Copyright (C) 1999-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chmod 21 | 22 | file=f 23 | touch $file || framework_failure_ 24 | 25 | umask 005 26 | for mode in =x =xX =Xx =x,=X =X,=x; do 27 | chmod a=r,$mode $file || fail=1 28 | case "$(ls -l $file)" in 29 | ---x--x---*) ;; 30 | *) fail=1; echo "after 'chmod $mode $file':"; ls -l $file ;; 31 | esac 32 | done 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /tests/chmod/inaccessible: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test for the bug fixed on 2006-09-20. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chmod 21 | 22 | mkdir -p d/e || framework_failure_ 23 | chmod 0 d/e d || framework_failure_ 24 | 25 | 26 | chmod u+rwx d d/e || fail=1 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/chmod/octal: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that chmod diagnoses a certain type of invalid mode string 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chmod 21 | 22 | 23 | # Before coreutils-5.92, this would mistakenly succeed, 24 | # and act like 'chmod 0 .'. 25 | chmod 0-followed-by-anything . 2> /dev/null && fail=1 26 | chmod 7-followed-by-anything . 2> /dev/null && fail=1 27 | chmod 8 . 2> /dev/null && fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/chmod/silent: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that chgrp, chmod, chown -f don't print some diagnostics 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chgrp chmod chown 21 | 22 | chmod -f 0 no-such 2> out && fail=1 23 | chgrp -f 0 no-such 2>> out && fail=1 24 | chown -f 0:0 no-such 2>> out && fail=1 25 | touch exp || fail=1 26 | 27 | compare exp out || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/chmod/thru-dangling: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test for proper error and exit code of chmod on a dangling symlink. 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chmod 21 | 22 | ln -s non-existent dangle || framework_failure_ 23 | 24 | 25 | # This operation cannot succeed since the symbolic link dangles. 26 | chmod 644 dangle 2> out && fail=1 27 | 28 | echo "chmod: cannot operate on dangling symlink 'dangle'" > exp 29 | compare exp out || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/chmod/umask-x: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test that chmod -x file reports an error if the result is executable. 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ chmod 21 | 22 | touch file 23 | chmod 755 file 24 | (umask 77 && chmod -x file) 2>/dev/null && fail=1 25 | 26 | Exit $fail 27 | -------------------------------------------------------------------------------- /tests/cp/attr-existing: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure cp --attributes-only doesn't truncate existing data 3 | 4 | # Copyright 2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | printf '1' > file1 23 | printf '2' > file2 24 | printf '2' > file2.exp 25 | 26 | cp --attributes-only file1 file2 || fail=1 27 | cmp file2 file2.exp || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/cp/backup-dir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that cp -b doesn't back up directories. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | mkdir x y || framework_failure_ 23 | 24 | 25 | cp -a x y || fail=1 26 | 27 | # This would mistakenly create a backup of y/x (y/x~) in coreutils-6.3. 28 | cp -ab x y || fail=1 29 | test -d y/x || fail=1 30 | test -d y/x~ && fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/cp/backup-is-src: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test cp backup to source file. 3 | 4 | # Copyright (C) 1998-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | echo a > a || framework_failure_ 23 | echo a-tilde > a~ || framework_failure_ 24 | 25 | # This cp command should exit nonzero. 26 | cp --b=simple a~ a > out 2>&1 && fail=1 27 | 28 | sed "s,cp:,XXX:," out > out2 29 | 30 | cat > exp <<\EOF 31 | XXX: backing up 'a' would destroy source; 'a~' not copied 32 | EOF 33 | 34 | compare exp out2 || fail=1 35 | 36 | Exit $fail 37 | -------------------------------------------------------------------------------- /tests/cp/deref-slink: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Demonstrate bug when using -d with an existing destination file 3 | # that is a symlink. 4 | 5 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ cp 22 | 23 | touch f slink-target || framework_failure_ 24 | ln -s slink-target slink || framework_failure_ 25 | 26 | cp -d f slink || fail=1 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/cp/dir-rm-dest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # verify that cp's --remove-destination option works with -R 3 | 4 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | mkdir d e || framework_failure_ 23 | 24 | # Do it once with no destination... 25 | cp -R --remove-destination d e || fail=1 26 | 27 | # ...and again, with an existing destination. 28 | cp -R --remove-destination d e || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/cp/dir-vs-file: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A directory may not replace an existing file. 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | mkdir dir || framework_failure_ 23 | touch file || framework_failure_ 24 | 25 | 26 | # In 4.0.35, this cp invocation silently succeeded. 27 | cp -R dir file 2>/dev/null && fail=1 28 | 29 | # Make sure file is not replaced with a directory. 30 | # In 4.0.35, it was. 31 | test -f file || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/cp/existing-perm-dir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure cp -p doesn't "restore" permissions it shouldn't (Bug#9170). 3 | 4 | # Copyright 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | umask 002 23 | mkdir -p -m ug-s,u=rwx,g=rwx,o=rx src/dir || fail=1 24 | mkdir -p -m ug-s,u=rwx,g=,o= dst/dir || fail=1 25 | 26 | cp -r src/. dst/ || fail=1 27 | 28 | mode=$(stat --p=%A dst/dir) 29 | test "$mode" = drwx------ || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/cp/link: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure cp --link -f works when the target exists. 3 | # This failed for 4.0z (due to a bug introduced in that test release). 4 | 5 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ cp 22 | 23 | touch src || framework_failure_ 24 | touch dest || framework_failure_ 25 | touch dest2 || framework_failure_ 26 | 27 | 28 | cp -f --link src dest || fail=1 29 | cp -f --symbolic-link src dest2 || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/cp/link-no-deref: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that cp --link --no-dereference works properly 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | ln -s no-such-file dangling-slink || framework_failure_ 23 | 24 | 25 | # Prior to coreutils-6.0, this would fail on non-Linux kernels, 26 | # with link being applied to the dangling symlink. 27 | cp --link --no-dereference dangling-slink d2 || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/cp/no-deref-link2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # cp from 3.16 fails this test 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | mkdir b 23 | msg=bar 24 | echo $msg > a 25 | cd b 26 | ln -s ../a . 27 | cd .. 28 | 29 | 30 | # It should fail with a message something like this: 31 | # cp: 'a' and 'b/foo' are the same file 32 | cp -d a b 2>/dev/null 33 | 34 | # Fail this test if the exit status is not 1 35 | test $? = 1 || fail=1 36 | 37 | test "$(cat a)" = $msg || fail=1 38 | 39 | Exit $fail 40 | -------------------------------------------------------------------------------- /tests/cp/no-deref-link3: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # cp from 3.16 fails this test 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | msg=bar 23 | echo $msg > a 24 | ln -s a b 25 | 26 | 27 | # It should fail with a message something like this: 28 | # cp: 'a' and 'b' are the same file 29 | cp -d a b 2>/dev/null 30 | 31 | # Fail this test if the exit status is not 1 32 | test $? = 1 || fail=1 33 | 34 | test "$(cat a)" = $msg || fail=1 35 | 36 | Exit $fail 37 | -------------------------------------------------------------------------------- /tests/cp/preserve-2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that cp's --preserve=X,Y option is parsed properly 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | # cp -p gives ENOTSUP on NFS on Linux 2.6.9 at least 23 | require_local_dir_ 24 | 25 | touch f || framework_failure_ 26 | 27 | cp --preserve=mode,links f g || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/cp/sparse-to-pipe: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # copy a sparse file to a pipe, to exercise some seldom-used parts of copy.c 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | require_sparse_support_ 23 | 24 | mkfifo_or_skip_ pipe 25 | timeout 10 cat pipe > copy & 26 | 27 | truncate -s1M sparse || framework_failure_ 28 | cp sparse pipe || fail=1 29 | 30 | # Ensure that the cat has completed before comparing. 31 | wait 32 | 33 | cmp sparse copy || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/cp/special-f: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that "cp -Rf fifo E" unlinks E and retries. 3 | # Up until coreutils-6.10.171, it would not. 4 | 5 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ cp 22 | 23 | mkfifo_or_skip_ fifo 24 | 25 | touch e || framework-failure 26 | 27 | 28 | # Without -f, expect it to fail. 29 | cp -R fifo e || fail=1 30 | 31 | # With -f, it must succeed. 32 | cp -Rf fifo e || fail=1 33 | test -p fifo || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/cp/src-base-dot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that "mkdir x y; cd y; cp -ab ../x/. ." is a successful, silent, no-op. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ cp 21 | 22 | mkdir x y || framework_failure_ 23 | 24 | 25 | cd y 26 | cp --verbose -ab ../x/. . > out 2>&1 || fail=1 27 | cat <<\EOF > exp || fail=1 28 | EOF 29 | 30 | compare exp out || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/cp/trailing-slash: -------------------------------------------------------------------------------- 1 | # this is just a place-holder. 2 | # For trailing-slash-related tests, see ../mv/trailing-slash. 3 | -------------------------------------------------------------------------------- /tests/d_type-check: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # Exit 0 if "." has useful d_type information, else 1. 3 | # Intended to exit 0 only on Linux/GNU systems. 4 | import sys 5 | 6 | fail = 1 7 | try: 8 | import ctypes 9 | 10 | (DT_UNKNOWN, DT_DIR,) = (0, 4,) 11 | 12 | class dirent(ctypes.Structure): 13 | _fields_ = [ 14 | ("d_ino", ctypes.c_long), 15 | ("d_off", ctypes.c_long), 16 | ("d_reclen", ctypes.c_ushort), 17 | ("d_type", ctypes.c_ubyte), 18 | ("d_name", ctypes.c_char*256)] 19 | 20 | direntp = ctypes.POINTER(dirent) 21 | 22 | # FIXME: find a way to avoid hard-coding libc's so-name. 23 | libc = ctypes.cdll.LoadLibrary("libc.so.6") 24 | libc.readdir.restype = direntp 25 | 26 | dirp = libc.opendir(".") 27 | if dirp: 28 | ep = libc.readdir(dirp) 29 | if ep: 30 | name = ep.contents.d_name 31 | if (name == "." or name == "..") and ep.contents.d_type == DT_DIR: 32 | fail = 0 33 | 34 | except: 35 | pass 36 | 37 | sys.exit(fail) 38 | -------------------------------------------------------------------------------- /tests/dd/not-rewound: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure dd does the right thing when the input file descriptor 3 | # is not rewound. 4 | 5 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ dd 22 | 23 | 24 | echo abcde > in 25 | (dd skip=1 count=1 bs=1; dd skip=1 bs=1) < in > out 2> /dev/null || fail=1 26 | case $(cat out) in 27 | bde) ;; 28 | *) fail=1 ;; 29 | esac 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/dd/unblock-sync: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that dd conv=unblock,sync works. 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ dd 21 | 22 | printf 000100020003xx > in || framework_failure_ 23 | 24 | 25 | dd cbs=4 ibs=4 conv=unblock,sync < in > out 2> /dev/null || fail=1 26 | cat <<\EOF > exp || fail=1 27 | 0001 28 | 0002 29 | 0003 30 | xx 31 | EOF 32 | 33 | compare exp out || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/df/header: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that "df ." outputs a header. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ df 21 | 22 | case $(df .) in 23 | *' 24 | '*) ;; 25 | *) fail=1;; 26 | esac 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/df/unreadable: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that df can handle an unreadable argument 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ df 21 | skip_if_root_ 22 | 23 | touch unreadable || fail=1 24 | chmod a-r unreadable || fail=1 25 | df unreadable || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/du/no-deref: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that by default, du doesn't dereference command-line symlinks. 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ du 21 | 22 | mkdir -p dir/a/b || framework_failure_ 23 | ln -s dir slink || framework_failure_ 24 | 25 | 26 | du slink | sed 's/^[0-9][0-9]* //' > out 27 | cat <<\EOF > exp 28 | slink 29 | EOF 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/du/restore-wd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # due to a bug in glibc's ftw.c, in some cases, nftw w/FTW_CHDIR 3 | # would not restore the working directory. 4 | 5 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ du 22 | 23 | mkdir a b || framework_failure_ 24 | 25 | 26 | # With du from coreutils-4.5.5 and 4.5.6, this would fail with 27 | # du: 'b': No such file or directory 28 | 29 | du a b > out || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/du/slash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 'du /' would omit the '/' on the last line. 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ du 21 | require_readable_root_ 22 | 23 | 24 | du --exclude='[^/]*' -x / > out-t || fail=1 25 | sed 's/^[0-9][0-9]* //' out-t > out 26 | rm -f out-t 27 | cat <<\EOF > exp 28 | / 29 | EOF 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/fiemap-capable: -------------------------------------------------------------------------------- 1 | import struct, fcntl, sys, os 2 | 3 | def sizeof(t): return struct.calcsize(t) 4 | IOCPARM_MASK = 0x7f 5 | IOC_OUT = 0x40000000 6 | IOC_IN = 0x80000000 7 | IOC_INOUT = (IOC_IN|IOC_OUT) 8 | def _IOWR(x,y,t): return (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|y) 9 | 10 | try: 11 | fd = os.open (len (sys.argv) == 2 and sys.argv[1] or '.', os.O_RDONLY) 12 | struct_fiemap = '=qqllll' 13 | FS_IOC_FIEMAP = _IOWR (ord ('f'), 11, struct_fiemap) 14 | fcntl.ioctl (fd, FS_IOC_FIEMAP, struct.pack(struct_fiemap, 0,~0,0,0,0,0)) 15 | except: 16 | sys.exit (1) 17 | -------------------------------------------------------------------------------- /tests/id/gnu-zero-uids: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # On GNU, 'id' must fail for processes with zero UIDs. 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ id 21 | 22 | require_gnu_ 23 | 24 | sush - true || skip_ "the 'sush' command does not work" 25 | 26 | # Run 'id' with zero UIDs. It should exit with a non-zero status. 27 | sush - id > out && fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/install/d-slashdot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that ginstall -d works with arguments specified with a trailing "/.". 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ install 21 | 22 | 23 | ginstall -d d1/. || fail=1 24 | test -d d1 || fail=1 25 | 26 | ginstall -d d2/.. || fail=1 27 | test -d d2 || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/lang-default: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Set locale-related environment variables so we get consistent 3 | # message translations, time formats, sort orderings, etc. 4 | 5 | LC_ALL=C 6 | export LC_ALL 7 | unset LANGUAGE NLSPATH 8 | 9 | # These settings shouldn't matter, but unset them anyway just in case. 10 | unset LANG LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME 11 | -------------------------------------------------------------------------------- /tests/ln/backup-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Try to create a symlink with backup where the destination file exists 3 | # and the backup file name is a hard link to the destination file. 4 | 5 | # Copyright (C) 1999-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | # Based on a problem report from Jamie Lokier. 21 | 22 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 23 | print_ver_ ln 24 | 25 | touch a b || framework_failure_ 26 | 27 | ln b b~ || fail=1 28 | ln -f --b=simple a b || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/ln/hard-backup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that 'ln --backup F F' gives a proper diagnostic. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ln 21 | 22 | touch f || framework_failure_ 23 | 24 | 25 | ln --backup f f 2> out && fail=1 26 | cat <<\EOF > exp || fail=1 27 | ln: 'f' and 'f' are the same file 28 | EOF 29 | 30 | compare exp out || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/ln/relative: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "ln --relative". 3 | 4 | # Copyright (C) 2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ln 21 | 22 | mkdir -p usr/bin || framework_failure_ 23 | mkdir -p usr/lib/foo || framework_failure_ 24 | touch usr/lib/foo/foo || framework_failure_ 25 | 26 | ln -sr usr/lib/foo/foo usr/bin/foo 27 | test $(readlink usr/bin/foo) = '../lib/foo/foo' || fail=1 28 | 29 | ln -sr usr/bin/foo usr/lib/foo/link-to-foo 30 | test $(readlink usr/lib/foo/link-to-foo) = 'foo' || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/ln/sf-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "ln -sf". 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ln 21 | 22 | echo foo > a || framework_failure_ 23 | ln -s . b || framework_failure_ 24 | 25 | ln -sf a b > err 2>&1 && fail=1 26 | case $(cat err) in 27 | *'are the same file') ;; 28 | *) fail=1 ;; 29 | esac 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/ln/slash-decorated-nonexistent-dest: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that touch f; ln -T f no-such-file/ does not mistakenly succeed 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ln 21 | 22 | touch f || framework_failure_ 23 | 24 | 25 | # Before coreutils-7.6, this would succeed on Solaris 10 26 | ln -T f no-such-file/ && fail=1 27 | test -e no-such-file && fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/ln/target-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "ln --target-dir" with one file. 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | # Before coreutils-4.5.3, --target-dir didn't work with one file. 20 | # It would create the desired link, but would fail with a diagnosis like this: 21 | # ln: 'd/.': cannot overwrite directory 22 | # Based on a test case from Dmitry V. Levin. 23 | 24 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 25 | print_ver_ ln 26 | 27 | mkdir d || framework_failure_ 28 | ln -s --target-dir=d ../f || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/ls/dired: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure --dired option works 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ls 21 | 22 | mkdir dir || framework_failure_ 23 | 24 | 25 | LC_MESSAGES=C ls -lR --dired dir > out || fail=1 26 | cat < exp 27 | dir: 28 | total 0 29 | //SUBDIRED// 2 5 30 | //DIRED-OPTIONS// --quoting-style=literal 31 | EOF 32 | 33 | compare exp out || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/ls/proc-selinux-segfault: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ls -l /proc/sys would segfault when built against libselinux1 2.0.15-2+b1 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ls 21 | 22 | f=/proc/sys 23 | test -r $f || f=. 24 | 25 | ls -l $f > out || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/ls/slink-acl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # verify that ls -lL works when applied to a symlink to an ACL'd file 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ls 21 | 22 | require_setfacl_ 23 | 24 | touch k || framework_failure_ 25 | setfacl -m user::r-- k || framework_failure_ 26 | ln -s k s || framework_failure_ 27 | 28 | set _ $(ls -Log s); shift; link=$1 29 | set _ $(ls -og k); shift; reg=$1 30 | 31 | test "$link" = "$reg" || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/ls/symlink-slash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Do dereference a symlink arg if its name is written with a trailing slash. 3 | 4 | # Copyright (C) 1999-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ls 21 | 22 | mkdir dir || framework_failure_ 23 | ln -s dir symlink || framework_failure_ 24 | 25 | set $(ls -l symlink/) 26 | 27 | # Prior to fileutils-4.0k, the following would have output '... symlink -> dir'. 28 | test "$*" = 'total 0' && : || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/ls/x-option: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Exercise the -x option. 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ ls 21 | 22 | mkdir subdir || framework_failure_ 23 | touch subdir/b || framework_failure_ 24 | touch subdir/a || framework_failure_ 25 | 26 | 27 | # Coreutils 6.8 and 6.9 would output this in the wrong order. 28 | ls -x subdir > out || fail=1 29 | ls -rx subdir >> out || fail=1 30 | cat <<\EOF > exp || fail=1 31 | a b 32 | b a 33 | EOF 34 | 35 | compare exp out || fail=1 36 | 37 | Exit $fail 38 | -------------------------------------------------------------------------------- /tests/misc/arch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that arch output is equal to uname -m 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ arch 21 | 22 | require_built_ arch 23 | 24 | arch > out || fail=1 25 | uname -m > exp || fail=1 26 | 27 | compare exp out || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/misc/chcon-fail: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that chcon fails when it should. 3 | # These tests don't use any actual SE Linux syscalls. 4 | 5 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ chcon 22 | 23 | 24 | # neither context nor file 25 | chcon 2> /dev/null && fail=1 26 | 27 | # No file 28 | chcon CON 2> /dev/null && fail=1 29 | 30 | # No file 31 | touch f 32 | chcon --reference=f 2> /dev/null && fail=1 33 | 34 | # No file 35 | chcon -u anyone 2> /dev/null && fail=1 36 | 37 | Exit $fail 38 | -------------------------------------------------------------------------------- /tests/misc/csplit-1000: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # cause a 1-byte heap buffer overrun 3 | 4 | # Copyright (C) 2010-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ csplit 21 | 22 | # Before coreutils-8.7, this would overrun the 6-byte filename_space buffer. 23 | # It's hard to detect that without using valgrind, so here, we simply 24 | # run the demonstrator. 25 | seq 1000 | csplit - '/./' '{*}' || fail=1 26 | test -f xx1000 || fail=1 27 | test -f xx1001 && fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/misc/csplit-heap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that csplit uses a bounded amount of memory 3 | 4 | # Copyright (C) 2010-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ csplit 21 | 22 | require_ulimit_ 23 | 24 | ( 25 | ulimit -v 20000 26 | { yes | head -n2500000; echo n; } | csplit -z - %n%1 27 | ) || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/misc/false-status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that false exits nonzero even with --help or --version 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ false 21 | 22 | false --version > /dev/null && fail=1 23 | false --help > /dev/null && fail=1 24 | 25 | Exit $fail 26 | -------------------------------------------------------------------------------- /tests/misc/groups-dash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure groups handles -- sanely 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ groups 21 | require_built_ groups 22 | 23 | # Coreutils 6.9 and earlier failed to display information on first argument 24 | # if later argument was --. 25 | groups none -- > out 2>&1 && fail=1 26 | echo $? >> out 27 | groups -- none -- > exp 2>&1 && fail=1 28 | echo $? >> exp 29 | 30 | compare exp out || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/misc/groups-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure groups --version output is similar to id --version 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ groups 21 | require_built_ groups 22 | 23 | groups --version | sed 's/^groups/id/; /^$/q' > out || fail=1 24 | id --version | sed '/^$/q' > exp || fail=1 25 | 26 | compare exp out || fail=1 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/misc/head-c: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # exercise the fix of 2001-08-18, based on test case from Ian Bruce 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ head 21 | 22 | echo abc > in || framework_failure_ 23 | 24 | (head -c1; head -c1) < in > out || fail=1 25 | case "$(cat out)" in 26 | ab) ;; 27 | *) fail=1 ;; 28 | esac 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/misc/id-groups: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that "id" outputs groups for a user 3 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 4 | 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | 18 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 19 | print_ver_ id 20 | 21 | id -G $(id -nu) || fail=1 22 | 23 | Exit $fail 24 | -------------------------------------------------------------------------------- /tests/misc/nproc-avail: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that "nproc" is less than or equal to "nproc --all". 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ nproc 21 | 22 | all=$(nproc --all) 23 | available=$(OMP_NUM_THREADS= nproc) 24 | 25 | test $available -le $all || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/misc/od-N: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Verify that 'od -N N' reads no more than N bytes of input. 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ od 21 | 22 | echo abcdefg > in || framework_failure_ 23 | 24 | 25 | (od -An -N3 -c; od -An -N3 -c) < in > out 26 | cat < exp || fail=1 27 | a b c 28 | d e f 29 | EOF 30 | compare exp out || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/misc/printf-hex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure that only two hex. digits are consumed in a \xHHH sequence 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ printf 21 | 22 | env printf '\x7e3\n' > out || fail=1 23 | cat <<\EOF > exp 24 | ~3 25 | EOF 26 | 27 | compare exp out || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/misc/shred-exact: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure that neither --exact nor --zero gobbles a command line argument 3 | 4 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ shred 21 | 22 | 23 | for opt in --exact --zero; do 24 | echo a > a || fail=1 25 | echo bb > b || fail=1 26 | echo ccc > c || fail=1 27 | 28 | shred --remove $opt a b || fail=1 29 | test -f a && fail=1 30 | test -f b && fail=1 31 | 32 | shred --remove $opt c || fail=1 33 | test -f c && fail=1 34 | done 35 | 36 | Exit $fail 37 | -------------------------------------------------------------------------------- /tests/misc/sort-NaN-infloop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # exercise the NaN-infloop bug in coreutils-8.13 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ sort 21 | 22 | echo nan > F || fail=1 23 | printf 'nan\nnan\n' > exp || fail=1 24 | timeout 10 sort -g -m F F > out || fail=1 25 | 26 | compare exp out || fail=1 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/misc/sort-unique: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test 'sort -u'. 3 | 4 | # Copyright (C) 2010-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ sort 21 | 22 | cat > in <<\EOF 23 | 1 24 | 2 25 | 1 26 | 3 27 | EOF 28 | 29 | cat > exp <<\EOF 30 | 1 31 | 2 32 | 3 33 | EOF 34 | 35 | for LOC in C "$LOCALE_FR" "$LOCALE_FR_UTF8"; do 36 | test -z "$LOC" && continue 37 | 38 | LC_ALL=$LOC sort -u in > out || { fail=1; break; } 39 | compare exp out || { fail=1; break; } 40 | done 41 | 42 | Exit $fail 43 | -------------------------------------------------------------------------------- /tests/misc/stat-fmt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that stat properly handles a format string ending with % 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ stat 21 | 22 | 23 | 24 | for i in $(seq 50); do 25 | fmt=$(printf "%${i}s" %) 26 | out=$(stat --form="$fmt" .) 27 | test "$out" = "$fmt" || fail=1 28 | done 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/misc/stat-hyphen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # demonstrate that stat - works and stat -f - does not. 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ stat 21 | 22 | printf -- '-\n' > exp || framework_failure_ 23 | touch f || framework_failure_ 24 | 25 | stat --format=%n - < f > out || fail=1 26 | stat -f - < f && fail=1 27 | 28 | compare exp out || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/misc/stat-mount: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test stat -c%m 3 | 4 | # Copyright (C) 2010-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ stat 21 | 22 | df_mnt=$(df -P . | sed -n '2s/.* \([^ ]*$\)/\1/p') 23 | stat_mnt=$(stat -c%m .) || fail=1 24 | test "$stat_mnt" || fail=1 25 | 26 | Exit $fail 27 | -------------------------------------------------------------------------------- /tests/misc/tac-2-nonseekable: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that tac works with two or more non-seekable inputs 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ tac 21 | 22 | echo x | tac - - > out 2> err || fail=1 23 | echo x > exp || fail=1 24 | compare exp out || fail=1 25 | compare /dev/null err || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/misc/tee: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # test for basic tee functionality. 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ tee 21 | 22 | echo line >sample || framework_failure_ 23 | nums=$(seq 9) || framework_failure_ 24 | 25 | for n in 0 $nums; do 26 | files=$(seq $n) 27 | rm -f $files 28 | tee $files out || fail=1 29 | for f in out $files; do 30 | compare sample $f || fail=1 31 | done 32 | done 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /tests/misc/tee-dash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # test for "tee -". 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ tee 21 | 22 | tee - . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ truncate 21 | 22 | ln -s truncate-target t-symlink 23 | 24 | truncate -s0 t-symlink || fail=1 25 | 26 | test -f truncate-target || fail=1 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/misc/truncate-dir-fail: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure truncate fails for a directory. 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ truncate 21 | 22 | # truncate on dir not allowed 23 | truncate -s+0 . && fail=1 24 | 25 | Exit $fail 26 | -------------------------------------------------------------------------------- /tests/misc/truncate-fifo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure truncate works on fifos without hanging 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ truncate 21 | 22 | mkfifo_or_skip_ fifo 23 | 24 | timeout 10 truncate -s0 fifo 25 | test "$?" = 124 && fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/misc/truncate-no-create-missing: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that truncate -c no-such-file doesn't fail. 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ truncate 21 | 22 | 23 | # truncate -c no-such-file should not fail. 24 | truncate -s0 -c no-such-file || fail=1 25 | 26 | Exit $fail 27 | -------------------------------------------------------------------------------- /tests/misc/truncate-relative: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Validate truncate relative sizes 3 | 4 | # Copyright (C) 2008-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ truncate 21 | 22 | 23 | # mixture of relative modifiers not allowed 24 | truncate --size="+>0" file && fail=1 25 | 26 | # mixture of relative modifiers not allowed 27 | truncate --size=">+0" file && fail=1 28 | 29 | # division by zero 30 | truncate --size="/0" file && fail=1 31 | 32 | # division by zero 33 | truncate --size="%0" file && fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/misc/uniq-perf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # before coreutils-8.10, seq 100000|uniq -f 10000000000 would run for days 3 | 4 | # Copyright (C) 2011-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ uniq 21 | 22 | seq 100 > in || fail=1 23 | timeout 1 uniq -f 10000000000 in || fail=1 24 | 25 | Exit $fail 26 | -------------------------------------------------------------------------------- /tests/mkdir/p-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "mkdir -p". 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mkdir 21 | 22 | mkdir --parents "$(pwd)/t" || fail=1 23 | test -d t || fail=1 24 | 25 | Exit $fail 26 | -------------------------------------------------------------------------------- /tests/mkdir/p-2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Just like p-1, but with an absolute path. 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mkdir 21 | 22 | mkdir --parents "$(pwd)/t/u" || fail=1 23 | test -d t/u || fail=1 24 | 25 | Exit $fail 26 | -------------------------------------------------------------------------------- /tests/mkdir/p-slashdot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that mkdir -p works with arguments specified with a trailing "/.". 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mkdir 21 | 22 | 23 | mkdir -p d1/. || fail=1 24 | test -d d1 || fail=1 25 | 26 | mkdir -p d2/.. || fail=1 27 | test -d d2 || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/mkdir/p-thru-slink: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mkdir 21 | 22 | ln -s . slink || framework_failure_ 23 | 24 | mkdir -p slink/x || fail=1 25 | test -d x || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/mkdir/p-v: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test mkdir -pv. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mkdir 21 | 22 | mkdir -pv foo/a/b/c/d >out || fail=1 23 | 24 | compare - out <<\EOF 25 | mkdir: created directory 'foo' 26 | mkdir: created directory 'foo/a' 27 | mkdir: created directory 'foo/a/b' 28 | mkdir: created directory 'foo/a/b/c' 29 | mkdir: created directory 'foo/a/b/c/d' 30 | EOF 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/mkdir/t-slash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that mkdir works with arguments specified with and without 3 | # a trailing slash. 4 | 5 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ mkdir 22 | 23 | 24 | mkdir -p dir/ || fail=1 25 | test -d dir || fail=1 26 | 27 | # This failed on NetBSD for fileutils-4.0.33. 28 | mkdir d2/ || fail=1 29 | test -d d2 || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/mv/dir-file: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # mv must fail when src and dest are mismatched directory/non-directory. 3 | 4 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mv 21 | 22 | mkdir -p dir/file || framework_failure_ 23 | > file || framework_failure_ 24 | 25 | 26 | # These should both fail, but until fileutils-4.0q only the second one did. 27 | mv dir file > /dev/null 2>&1 && fail=1 28 | mv file dir > /dev/null 2>&1 && fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/mv/hard-verbose: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that mv's --verbose options works even in this unusual case 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mv 21 | 22 | touch x || framework_failure_ 23 | ln x y || framework_failure_ 24 | 25 | 26 | mv --verbose x y > out || fail=1 27 | cat <<\EOF > exp || fail=1 28 | removed 'x' 29 | EOF 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/mv/i-5: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure 'mv -i dir file' prompts before failing. 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ mv 21 | 22 | mkdir a || framework_failure_ 23 | touch b || framework_failure_ 24 | 25 | 26 | # coreutils 6.2 mv would neglect to prompt in this case. 27 | echo n | mv -i a b 2>/dev/null || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/mv/into-self-4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # confirm that 'mv symlink symlink' doesn't remove symlink 3 | # Based on an example from David Luyer. 4 | 5 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ mv 22 | 23 | touch file || framework_failure_ 24 | ln -s file s || framework_failure_ 25 | 26 | 27 | # This must fail. 28 | mv s s 2> /dev/null && fail=1 29 | 30 | # But the symlink, s, must not be removed. 31 | # Before 4.0.36, 's' would have been removed. 32 | test -f s || fail=1 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /tests/mv/part-rename: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Moving a directory specified with a trailing slash from one partition to 3 | # another, and giving it a different name at the destination would cause mv 4 | # to get a failed assertion. 5 | 6 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 7 | 8 | # This program is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 22 | print_ver_ mv 23 | cleanup_() { rm -rf "$other_partition_tmpdir"; } 24 | . "$abs_srcdir/other-fs-tmpdir" 25 | 26 | mkdir foo || framework_failure_ 27 | 28 | 29 | mv foo/ "$other_partition_tmpdir/bar" || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/mv/perm-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that mv gives one diagnostic, not two, when failing 3 | # due to lack of permissions 4 | 5 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ mv 22 | skip_if_root_ 23 | 24 | mkdir -p no-write/dir || framework_failure_ 25 | chmod u-w no-write || framework_failure_ 26 | 27 | 28 | mv no-write/dir . > out 2>&1 && fail=1 29 | cat <<\EOF > exp 30 | mv: cannot move 'no-write/dir' to './dir': Permission denied 31 | EOF 32 | 33 | compare exp out || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/pr/2-S_f-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzz:dddd.bcde-fghijklmn-opqrstuvw-xyzzz 7 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzz:eeee.bcde-fghijklmn-opqrstuvw-xyzzz 8 | cccc.bcde-fghijklmn-opqrstuvw-xyzzz 9 | -------------------------------------------------------------------------------- /tests/pr/2-Sf-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzzzdddd.bcde-fghijklmn-opqrstuvw-xyzzzz 7 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzzzeeee.bcde-fghijklmn-opqrstuvw-xyzzzz 8 | cccc.bcde-fghijklmn-opqrstuvw-xyzzzz 9 | -------------------------------------------------------------------------------- /tests/pr/2f-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzz dddd.bcde-fghijklmn-opqrstuvw-xyzzz 7 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzz eeee.bcde-fghijklmn-opqrstuvw-xyzzz 8 | cccc.bcde-fghijklmn-opqrstuvw-xyzzz 9 | -------------------------------------------------------------------------------- /tests/pr/2s_f-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:dddd.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-dddddddddddddddddddddddddddddddddddddddd 7 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:eeee.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 8 | cccc.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-cccccccccccccccccccccccccccccccccccccccc 9 | -------------------------------------------------------------------------------- /tests/pr/2s_w60f-t_nota: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw:dddd.bcde-fghijklmn-opqrstuvw 7 | bbbb.bcde-fghijklmn-opqrstuvw:eeee.bcde-fghijklmn-opqrstuvw 8 | cccc.bcde-fghijklmn-opqrstuvw 9 | -------------------------------------------------------------------------------- /tests/pr/2sf-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa dddd.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-dddddddddddddddddddddddddddddddddddddddd 7 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb eeee.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 8 | cccc.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-cccccccccccccccccccccccccccccccccccccccc 9 | -------------------------------------------------------------------------------- /tests/pr/2sw60f-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw-dddd.bcde-fghijklmn-opqrstuvw- 7 | bbbb.bcde-fghijklmn-opqrstuvw-eeee.bcde-fghijklmn-opqrstuvw- 8 | cccc.bcde-fghijklmn-opqrstuvw- 9 | -------------------------------------------------------------------------------- /tests/pr/2w60f-t_notab: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | aaaa.bcde-fghijklmn-opqrstuvw dddd.bcde-fghijklmn-opqrstuvw 7 | bbbb.bcde-fghijklmn-opqrstuvw eeee.bcde-fghijklmn-opqrstuvw 8 | cccc.bcde-fghijklmn-opqrstuvw 9 | -------------------------------------------------------------------------------- /tests/pr/3a3f-0F: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 4 10 | 11 | 12 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 13 | 8 9 3456789 ab 20 DEFGHI 123 14 | 1 2 3 15 | 4 5 6 16 | 27 no truncation before 28 no trunc 17 | 18 | 19 | -- Date/Time -- x Page 5 20 | 21 | 22 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 23 | 2 3456789 abcdefghi 3 24 | -------------------------------------------------------------------------------- /tests/pr/3a3l15-t: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 1 2 3456789 abcdefghi 3 7 | 4 5 6 8 | 7 8 9 3456789 abcdefghi 9 | 40 DEFGHI 123456789 41 yzxyzxyz XYZXYZXYZ a 42 456789 123456789 abc 10 | 43 xyzxyzxyz XYZXYZXYZ 44 456789 123456789 xyz 5 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -- Date/Time -- x Page 4 19 | 20 | 21 | 6 7 8 22 | 9 50 1 23 | 2 3 4 24 | 55 yzxyzxyz XYZXYZXYZ a 56 456789 123456789 abc 57 xyzxyzxyz XYZXYZXYZ 25 | 58 456789 123456789 xyz 9 60 DEFGHI 123456789 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -- Date/Time -- x Page 5 34 | 35 | 36 | 1 2 3 ------- EOF -------- 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/pr/3a3l15f-t: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 1 2 3456789 abcdefghi 3 7 | 4 5 6 8 | 7 8 9 3456789 abcdefghi 9 | 40 DEFGHI 123456789 41 yzxyzxyz XYZXYZXYZ a 42 456789 123456789 abc 10 | 43 xyzxyzxyz XYZXYZXYZ 44 456789 123456789 xyz 5 11 | 12 | 13 | -- Date/Time -- x Page 4 14 | 15 | 16 | 6 7 8 17 | 9 50 1 18 | 2 3 4 19 | 55 yzxyzxyz XYZXYZXYZ a 56 456789 123456789 abc 57 xyzxyzxyz XYZXYZXYZ 20 | 58 456789 123456789 xyz 9 60 DEFGHI 123456789 21 | 22 | 23 | -- Date/Time -- x Page 5 24 | 25 | 26 | 1 2 3 ------- EOF -------- 27 | -------------------------------------------------------------------------------- /tests/pr/3b3f-0F: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 4 10 | 11 | 12 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 13 | 16 456789 123456789 xyz 1 6 14 | 7 2 27 no truncation before 15 | 8 3 28 no trunc 16 | 9 3456789 ab 4 17 | 18 | 19 | -- Date/Time -- x Page 5 20 | 21 | 22 | 29 xyzxyzxyz XYZXYZXYZ 1 3 23 | 30 456789 123456789 xyz 2 3456789 abcdefghi 24 | -------------------------------------------------------------------------------- /tests/pr/3b3f-0FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 1 FF-Test: FF's at St 6 FF-Arangements: Emp 1 7 | 2 Options -b -3 / -a 7 \ftext; \f\ntext; 2 8 | 3 ------------------- 8 \f\ftext; \f\f\ntex 3 line truncation befor 9 | 4 3456789 123456789 123 9 3456789 123456789 123 14 456789 123456789 123 10 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 11 | 12 | 13 | -- Date/Time -- x Page 4 14 | 15 | 16 | 17 | 18 | 19 | -- Date/Time -- x Page 5 20 | 21 | 22 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 23 | 16 456789 123456789 xyz 1 6 24 | 7 2 27 no truncation before 25 | 8 3 28 no trunc 26 | 9 3456789 ab 4 27 | 28 | 29 | -- Date/Time -- x Page 6 30 | 31 | 32 | 29 xyzxyzxyz XYZXYZXYZ 1 3 33 | 30 456789 123456789 xyz 2 3456789 abcdefghi 34 | -------------------------------------------------------------------------------- /tests/pr/3b3l15-t: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 1 6 41 yzxyzxyz XYZXYZXYZ a 7 | 2 3456789 abcdefghi 7 42 456789 123456789 abc 8 | 3 8 43 xyzxyzxyz XYZXYZXYZ 9 | 4 9 3456789 abcdefghi 44 456789 123456789 xyz 10 | 5 40 DEFGHI 123456789 5 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -- Date/Time -- x Page 4 19 | 20 | 21 | 6 1 56 456789 123456789 abc 22 | 7 2 57 xyzxyzxyz XYZXYZXYZ 23 | 8 3 58 456789 123456789 xyz 24 | 9 4 9 25 | 50 55 yzxyzxyz XYZXYZXYZ a 60 DEFGHI 123456789 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -- Date/Time -- x Page 5 34 | 35 | 36 | 1 2 3 ------- EOF -------- 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tests/pr/3b3l15f-t: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 1 6 41 yzxyzxyz XYZXYZXYZ a 7 | 2 3456789 abcdefghi 7 42 456789 123456789 abc 8 | 3 8 43 xyzxyzxyz XYZXYZXYZ 9 | 4 9 3456789 abcdefghi 44 456789 123456789 xyz 10 | 5 40 DEFGHI 123456789 5 11 | 12 | 13 | -- Date/Time -- x Page 4 14 | 15 | 16 | 6 1 56 456789 123456789 abc 17 | 7 2 57 xyzxyzxyz XYZXYZXYZ 18 | 8 3 58 456789 123456789 xyz 19 | 9 4 9 20 | 50 55 yzxyzxyz XYZXYZXYZ a 60 DEFGHI 123456789 21 | 22 | 23 | -- Date/Time -- x Page 5 24 | 25 | 26 | 1 2 3 ------- EOF -------- 27 | -------------------------------------------------------------------------------- /tests/pr/3f-0F: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 3 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 4 10 | 11 | 12 | 15 xyzxyzxyz XYZXYZXYZ abcabcab 13 | 16 456789 123456789 xyzxyzxyz XYZXYZXYZ 14 | 7 12345678 15 | 8 12345678 16 | 9 3456789 ab 17 | 20 DEFGHI 123 18 | 1 12345678 19 | 2 12345678 20 | 3 12345678 21 | 4 12345678 22 | 5 12345678 23 | 6 12345678 24 | 27 no truncation before FF; (r_l-test): 25 | 28 no trunc 26 | 27 | 28 | -- Date/Time -- x Page 5 29 | 30 | 31 | 29 xyzxyzxyz XYZXYZXYZ abcabcab 32 | 30 456789 123456789 xyzxyzxyz XYZXYZXYZ 33 | 1 12345678 34 | 2 3456789 abcdefghi 35 | 3 12345678 36 | -------------------------------------------------------------------------------- /tests/pr/a3f-0F: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 2 10 | 11 | 12 | 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- 13 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: Emp 14 | 7 \ftext; \f\ntext; 8 \f\ftext; \f\f\ntex 9 3456789 123456789 123 15 | 10 zzzzzzzzzzzzzzzzzzz 1 2 16 | 3 line truncation befor 14 456789 123456789 123 17 | 18 | 19 | -- Date/Time -- x Page 3 20 | 21 | 22 | 23 | 24 | 25 | -- Date/Time -- x Page 4 26 | 27 | 28 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 29 | 8 9 3456789 ab 20 DEFGHI 123 30 | 1 2 3 31 | 4 5 6 32 | 27 no truncation before 28 no trunc 33 | 34 | 35 | -- Date/Time -- x Page 5 36 | 37 | 38 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 39 | 2 3456789 abcdefghi 3 40 | -------------------------------------------------------------------------------- /tests/pr/a3f-0FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 2 10 | 11 | 12 | 13 | 14 | 15 | -- Date/Time -- x Page 3 16 | 17 | 18 | 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- 19 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: Emp 20 | 7 \ftext; \f\ntext; 8 \f\ftext; \f\f\ntex 9 3456789 123456789 123 21 | 10 zzzzzzzzzzzzzzzzzzz 1 2 22 | 3 line truncation befor 14 456789 123456789 123 23 | 24 | 25 | -- Date/Time -- x Page 4 26 | 27 | 28 | 29 | 30 | 31 | -- Date/Time -- x Page 5 32 | 33 | 34 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 35 | 8 9 3456789 ab 20 DEFGHI 123 36 | 1 2 3 37 | 4 5 6 38 | 27 no truncation before 28 no trunc 39 | 40 | 41 | -- Date/Time -- x Page 6 42 | 43 | 44 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 45 | 2 3456789 abcdefghi 3 46 | -------------------------------------------------------------------------------- /tests/pr/b3f-0F: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 2 10 | 11 | 12 | 1 FF-Test: FF's at St 6 FF-Arangements: Emp 1 13 | 2 Options -b -3 / -a 7 \ftext; \f\ntext; 2 14 | 3 ------------------- 8 \f\ftext; \f\f\ntex 3 line truncation befor 15 | 4 3456789 123456789 123 9 3456789 123456789 123 14 456789 123456789 123 16 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 17 | 18 | 19 | -- Date/Time -- x Page 3 20 | 21 | 22 | 23 | 24 | 25 | -- Date/Time -- x Page 4 26 | 27 | 28 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 29 | 16 456789 123456789 xyz 1 6 30 | 7 2 27 no truncation before 31 | 8 3 28 no trunc 32 | 9 3456789 ab 4 33 | 34 | 35 | -- Date/Time -- x Page 5 36 | 37 | 38 | 29 xyzxyzxyz XYZXYZXYZ 1 3 39 | 30 456789 123456789 xyz 2 3456789 abcdefghi 40 | -------------------------------------------------------------------------------- /tests/pr/b3f-0FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 1 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 2 10 | 11 | 12 | 13 | 14 | 15 | -- Date/Time -- x Page 3 16 | 17 | 18 | 1 FF-Test: FF's at St 6 FF-Arangements: Emp 1 19 | 2 Options -b -3 / -a 7 \ftext; \f\ntext; 2 20 | 3 ------------------- 8 \f\ftext; \f\f\ntex 3 line truncation befor 21 | 4 3456789 123456789 123 9 3456789 123456789 123 14 456789 123456789 123 22 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 23 | 24 | 25 | -- Date/Time -- x Page 4 26 | 27 | 28 | 29 | 30 | 31 | -- Date/Time -- x Page 5 32 | 33 | 34 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 35 | 16 456789 123456789 xyz 1 6 36 | 7 2 27 no truncation before 37 | 8 3 28 no trunc 38 | 9 3456789 ab 4 39 | 40 | 41 | -- Date/Time -- x Page 6 42 | 43 | 44 | 29 xyzxyzxyz XYZXYZXYZ 1 3 45 | 30 456789 123456789 xyz 2 3456789 abcdefghi 46 | -------------------------------------------------------------------------------- /tests/pr/n+4b2l17f-0FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 4 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 5 10 | 11 | 12 | 15.15 xyzxyzxyz XYZXYZXYZ abcabcab 22.2 13 | 16.16 456789 123456789 xyzxyzxyz X 23.3 14 | 17.7 24.4 15 | 18.8 25.5 16 | 19.9 3456789 ab 26.6 17 | 20.20 DEFGHI 123 27.27 no truncation before FF; (r_ 18 | 21.1 28.28 no trunc 19 | 20 | 21 | -- Date/Time -- x Page 6 22 | 23 | 24 | 29.29 xyzxyzxyz XYZXYZXYZ abcabcab 32.2 3456789 abcdefghi 25 | 30.30 456789 123456789 xyzxyzxyz X 33.3 26 | 31.1 27 | -------------------------------------------------------------------------------- /tests/pr/n+5-8b3l17f-FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 5 4 | 5 | 6 | 29.29 xyzxyzxyz XYZXYZ 34.4 39.9 3456789 abcdefghi 7 | 30.30 456789 123456789 35.5 40.40 DEFGHI 123456789 8 | 31.1 36.6 41.41 yzxyzxyz XYZXYZX 9 | 32.2 3456789 abcdefghi 37.7 42.42 456789 123456789 10 | 33.3 38.8 11 | 12 | 13 | -- Date/Time -- x Page 6 14 | 15 | 16 | 17 | 18 | 19 | -- Date/Time -- x Page 7 20 | 21 | 22 | 23 | 24 | 25 | -- Date/Time -- x Page 8 26 | 27 | 28 | 43.43 xyzxyzxyz XYZXYZ 48.8 53.3 29 | 44.44 456789 123456789 49.9 54.4 30 | 45.5 50.50 55.55 yzxyzxyz XYZXYZX 31 | 46.6 51.1 56.56 456789 123456789 32 | 47.7 52.2 33 | -------------------------------------------------------------------------------- /tests/pr/n+5a3l13f-0FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 5 4 | 5 | 6 | 7 | 8 | 9 | -- Date/Time -- x Page 6 10 | 11 | 12 | 15.15 xyzxyzxyz XYZXYZ 16.16 456789 123456789 17.7 13 | 18.8 19.9 3456789 ab 20.20 DEFGHI 123 14 | 21.1 22.2 23.3 15 | 16 | 17 | -- Date/Time -- x Page 7 18 | 19 | 20 | 24.4 25.5 26.6 21 | 27.27 no truncation be 28.28 no trunc 22 | 23 | 24 | -- Date/Time -- x Page 8 25 | 26 | 27 | 29.29 xyzxyzxyz XYZXYZ 30.30 456789 123456789 31.1 28 | 32.2 3456789 abcdefghi 33.3 29 | -------------------------------------------------------------------------------- /tests/pr/n+6a2l17-FF: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- Date/Time -- x Page 6 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -- Date/Time -- x Page 7 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -- Date/Time -- x Page 8 38 | 39 | 40 | 43.43 xyzxyzxyz XYZXYZXYZ abcabcab 44.44 456789 123456789 xyzxyzxyz X 41 | 45.5 46.6 42 | 47.7 48.8 43 | 49.9 50.50 44 | 51.1 52.2 45 | 53.3 54.4 46 | 55.55 yzxyzxyz XYZXYZXYZ abcabcab 56.56 456789 123456789 abcdefghi A 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -- Date/Time -- x Page 9 55 | 56 | 57 | 57.57 xyzxyzxyz XYZXYZXYZ abcabcab 58.58 456789 123456789 xyzxyzxyz X 58 | 59.9 60.60 DEFGHI 123456789 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /tests/pr/t_notab: -------------------------------------------------------------------------------- 1 | aaaa.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 2 | bbbb.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 | cccc.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-cccccccccccccccccccccccccccccccccccccccc 4 | dddd.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-dddddddddddddddddddddddddddddddddddddddd 5 | eeee.bcde-fghijklmn-opqrstuvw-xyzzzzzzz-eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 6 | -------------------------------------------------------------------------------- /tests/pr/t_tab: -------------------------------------------------------------------------------- 1 | aaa abcde fghijklmnopqrstuvw 2 | bbb abcde fghijklmnopqrstuvw 3 | ccc abcde fghijklmnopqrstuvw 4 | ddd abcde fghijklmnopqrstuvw 5 | -------------------------------------------------------------------------------- /tests/pr/t_tab_: -------------------------------------------------------------------------------- 1 | aaa:abcde fghijklmnopqrstuvw 2 | bbb:abcde fghijklmnopqrstuvw 3 | ccc abcde fghijklmnopqrstuvw 4 | ddd abcde fghijklmnopqrstuvw 5 | -------------------------------------------------------------------------------- /tests/pr/ta3-0FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- 2 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: Emp 3 | 7 \ftext; \f\ntext; 8 \f\ftext; \f\f\ntex 9 3456789 123456789 123 4 | 10 zzzzzzzzzzzzzzzzzzz 1 2 5 | 3 line truncation befor 14 456789 123456789 123 6 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 7 | 8 9 3456789 ab 20 DEFGHI 123 8 | 1 2 3 9 | 4 5 6 10 | 27 no truncation before 28 no trunc 11 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 12 | 2 3456789 abcdefghi 3 13 | -------------------------------------------------------------------------------- /tests/pr/ta3-FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's in Te 2 Options -b -3 / -a 3 ------------------- 2 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: One 3 | 7 text\f\f\n; text\f\ 8 \f\f\n; \f\n\f\n; 9 4 | 10 zzzzzzzzzzzzzzzzzzz 1 2 5 | 3 line truncation befor 14 456789 123456789 123 6 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 7 | 8 9 3456789 ab 20 DEFGHI 123 8 | 1 2 3 9 | 4 5 6 10 | 27 no truncation before 28 no trunc 11 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 12 | 2 3456789 abcdefghi 3 4 13 | 5 6 7 14 | 8 9 3456789 abcdefghi 40 DEFGHI 123456789 15 | 41 yzxyzxyz XYZXYZXYZ a 42 456789 123456789 abc 16 | 43 xyzxyzxyz XYZXYZXYZ 44 456789 123456789 xyz 5 17 | 6 7 8 18 | 9 50 1 19 | 2 3 4 20 | 55 yzxyzxyz XYZXYZXYZ a 56 456789 123456789 abc 21 | 57 xyzxyzxyz XYZXYZXYZ 58 456789 123456789 xyz 9 22 | 60 DEFGHI 123456789 23 | -------------------------------------------------------------------------------- /tests/pr/tb3-0FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's at St 6 FF-Arangements: Emp 1 2 | 2 Options -b -3 / -a 7 \ftext; \f\ntext; 2 3 | 3 ------------------- 8 \f\ftext; \f\f\ntex 3 line truncation befor 4 | 4 3456789 123456789 123 9 3456789 123456789 123 14 456789 123456789 123 5 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 6 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 7 | 16 456789 123456789 xyz 1 6 8 | 7 2 27 no truncation before 9 | 8 3 28 no trunc 10 | 9 3456789 ab 4 11 | 29 xyzxyzxyz XYZXYZXYZ 1 3 12 | 30 456789 123456789 xyz 2 3456789 abcdefghi 13 | -------------------------------------------------------------------------------- /tests/pr/tb3-FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's in Te 6 FF-Arangements: One 1 2 | 2 Options -b -3 / -a 7 text\f\f\n; text\f\ 2 3 | 3 ------------------- 8 \f\f\n; \f\n\f\n; 3 line truncation befor 4 | 4 3456789 123456789 123 9 14 456789 123456789 123 5 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 6 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 7 | 16 456789 123456789 xyz 1 6 8 | 7 2 27 no truncation before 9 | 8 3 28 no trunc 10 | 9 3456789 ab 4 11 | 29 xyzxyzxyz XYZXYZXYZ 4 9 3456789 abcdefghi 12 | 30 456789 123456789 xyz 5 40 DEFGHI 123456789 13 | 1 6 41 yzxyzxyz XYZXYZXYZ a 14 | 2 3456789 abcdefghi 7 42 456789 123456789 abc 15 | 3 8 16 | 43 xyzxyzxyz XYZXYZXYZ 8 3 17 | 44 456789 123456789 xyz 9 4 18 | 5 50 55 yzxyzxyz XYZXYZXYZ a 19 | 6 1 56 456789 123456789 abc 20 | 7 2 21 | 57 xyzxyzxyz XYZXYZXYZ 9 60 DEFGHI 123456789 22 | 58 456789 123456789 xyz 23 | -------------------------------------------------------------------------------- /tests/pr/tn2e5o3-t_tab: -------------------------------------------------------------------------------- 1 | 1 aaa abcde fghij 3 ccc abcde fghij 2 | 2 bbb abcde fghij 4 ddd abcde fghij 3 | -------------------------------------------------------------------------------- /tests/pr/tn2e8-t_tab: -------------------------------------------------------------------------------- 1 | 1 aaa abcde fgh 3 ccc abcde fgh 2 | 2 bbb abcde fgh 4 ddd abcde fgh 3 | -------------------------------------------------------------------------------- /tests/pr/tn2e8o3-t_tab: -------------------------------------------------------------------------------- 1 | 1 aaa abcde fgh 3 ccc abcde fgh 2 | 2 bbb abcde fgh 4 ddd abcde fgh 3 | -------------------------------------------------------------------------------- /tests/pr/tn_2e8-t_tab: -------------------------------------------------------------------------------- 1 | 1:aaa abcde fgh 3:ccc abcde fgh 2 | 2:bbb abcde fgh 4:ddd abcde fgh 3 | -------------------------------------------------------------------------------- /tests/pr/tn_2e8S-t_tab: -------------------------------------------------------------------------------- 1 | 1:aaa abcde fg---- 3:ccc abcde fg 2 | 2:bbb abcde fg---- 4:ddd abcde fg 3 | -------------------------------------------------------------------------------- /tests/pr/tne8-t_tab: -------------------------------------------------------------------------------- 1 | 1 aaa abcde fghijklmnopqrstuvw 2 | 2 bbb abcde fghijklmnopqrstuvw 3 | 3 ccc abcde fghijklmnopqrstuvw 4 | 4 ddd abcde fghijklmnopqrstuvw 5 | -------------------------------------------------------------------------------- /tests/pr/tne8o3-t_tab: -------------------------------------------------------------------------------- 1 | 1 aaa abcde fghijklmnopqrstuvw 2 | 2 bbb abcde fghijklmnopqrstuvw 3 | 3 ccc abcde fghijklmnopqrstuvw 4 | 4 ddd abcde fghijklmnopqrstuvw 5 | -------------------------------------------------------------------------------- /tests/pr/tta3-0FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- 2 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: Emp 3 | 7 \ftext; \f\ntext; 8 \f\ftext; \f\f\ntex 9 3456789 123456789 123 4 | 10 zzzzzzzzzzzzzzzzzzz 1 2 5 | 3 line truncation befor 14 456789 123456789 123 6 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 7 | 8 9 3456789 ab 20 DEFGHI 123 8 | 1 2 3 9 | 4 5 6 10 | 27 no truncation before 28 no trunc 11 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 12 | 2 3456789 abcdefghi 3 13 | -------------------------------------------------------------------------------- /tests/pr/tta3-FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's in Te 2 Options -b -3 / -a 3 ------------------- 2 | 4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: One 3 | 7 text\f\f\n; text\f\ 8 \f\f\n; \f\n\f\n; 9 4 | 10 zzzzzzzzzzzzzzzzzzz 1 2 5 | 3 line truncation befor 14 456789 123456789 123 6 | 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 7 | 8 9 3456789 ab 20 DEFGHI 123 8 | 1 2 3 9 | 4 5 6 10 | 27 no truncation before 28 no trunc 11 | 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 12 | 2 3456789 abcdefghi 3 4 13 | 5 6 7 14 | 8 9 3456789 abcdefghi 40 DEFGHI 123456789 15 | 41 yzxyzxyz XYZXYZXYZ a 42 456789 123456789 abc 16 | 43 xyzxyzxyz XYZXYZXYZ 44 456789 123456789 xyz 5 17 | 6 7 8 18 | 9 50 1 19 | 2 3 4 20 | 55 yzxyzxyz XYZXYZXYZ a 56 456789 123456789 abc 21 | 57 xyzxyzxyz XYZXYZXYZ 58 456789 123456789 xyz 9 22 | 60 DEFGHI 123456789 23 | -------------------------------------------------------------------------------- /tests/pr/ttb3-0FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's at St 6 FF-Arangements: Emp 1 2 | 2 Options -b -3 / -a 7 \ftext; \f\ntext; 2 3 | 3 ------------------- 8 \f\ftext; \f\f\ntex 3 line truncation befor 4 | 4 3456789 123456789 123 9 3456789 123456789 123 14 456789 123456789 123 5 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 6 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 7 | 16 456789 123456789 xyz 1 6 8 | 7 2 27 no truncation before 9 | 8 3 28 no trunc 10 | 9 3456789 ab 4 11 | 29 xyzxyzxyz XYZXYZXYZ 1 3 12 | 30 456789 123456789 xyz 2 3456789 abcdefghi 13 | -------------------------------------------------------------------------------- /tests/pr/ttb3-FF: -------------------------------------------------------------------------------- 1 | 1 FF-Test: FF's in Te 6 FF-Arangements: One 1 2 | 2 Options -b -3 / -a 7 text\f\f\n; text\f\ 2 3 | 3 ------------------- 8 \f\f\n; \f\n\f\n; 3 line truncation befor 4 | 4 3456789 123456789 123 9 14 456789 123456789 123 5 | 5 3 Columns downwards 10 zzzzzzzzzzzzzzzzzzz 6 | 15 xyzxyzxyz XYZXYZXYZ 20 DEFGHI 123 5 7 | 16 456789 123456789 xyz 1 6 8 | 7 2 27 no truncation before 9 | 8 3 28 no trunc 10 | 9 3456789 ab 4 11 | 29 xyzxyzxyz XYZXYZXYZ 4 9 3456789 abcdefghi 12 | 30 456789 123456789 xyz 5 40 DEFGHI 123456789 13 | 1 6 41 yzxyzxyz XYZXYZXYZ a 14 | 2 3456789 abcdefghi 7 42 456789 123456789 abc 15 | 3 8 16 | 43 xyzxyzxyz XYZXYZXYZ 8 3 17 | 44 456789 123456789 xyz 9 4 18 | 5 50 55 yzxyzxyz XYZXYZXYZ a 19 | 6 1 56 456789 123456789 abc 20 | 7 2 21 | 57 xyzxyzxyz XYZXYZXYZ 9 60 DEFGHI 123456789 22 | 58 456789 123456789 xyz 23 | -------------------------------------------------------------------------------- /tests/rm/cycle: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # rm (coreutils-4.5.4) could be tricked into mistakenly reporting a cycle. 3 | 4 | # Copyright (C) 2003-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | skip_if_root_ 22 | 23 | mkdir -p a/b 24 | touch a/b/file 25 | chmod u-w a/b 26 | 27 | 28 | rm -rf a a 2>&1 | sed 's/:[^:]*$//' > out || fail=1 29 | cat <<\EOF > exp 30 | rm: cannot remove 'a/b/file' 31 | rm: cannot remove 'a/b/file' 32 | EOF 33 | 34 | compare exp out || fail=1 35 | 36 | Exit $fail 37 | -------------------------------------------------------------------------------- /tests/rm/d-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "rm --dir --verbose". 3 | 4 | # Copyright (C) 2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | 22 | mkdir a || framework_failure_ 23 | > b || framework_failure_ 24 | 25 | rm --verbose --dir a b > out || fail=1 26 | 27 | cat <<\EOF > exp || framework_failure_ 28 | removed directory: 'a' 29 | removed 'b' 30 | EOF 31 | 32 | test -e a && fail=1 33 | test -e b && fail=1 34 | 35 | # Compare expected and actual output. 36 | compare exp out || fail=1 37 | 38 | Exit $fail 39 | -------------------------------------------------------------------------------- /tests/rm/d-2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that 'rm -d dir' (i.e., without --recursive) gives a reasonable 3 | # diagnostic when failing. 4 | 5 | # Copyright (C) 2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ rm 22 | 23 | mkdir d || framework_failure_ 24 | > d/a || framework_failure_ 25 | 26 | rm -d d 2> out && fail=1 27 | printf "%s\n" \ 28 | "rm: cannot remove 'd': Directory not empty" \ 29 | > exp || framework_failure_ 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/rm/dir-nonrecur: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that 'rm dir' (i.e., without --recursive) gives a reasonable 3 | # diagnostic when failing. 4 | 5 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ rm 22 | 23 | mkdir d || framework_failure_ 24 | 25 | 26 | rm d 2> out && fail=1 27 | cat <<\EOF > exp || fail=1 28 | rm: cannot remove 'd': Is a directory 29 | EOF 30 | 31 | # Before coreutils-5.93 this test would fail on Solaris 9 and newer. 32 | compare exp out || fail=1 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /tests/rm/dot-rel: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Use rm -r to remove two non-empty dot-relative directories. 3 | # This would have failed between 2004-10-18 and 2004-10-21. 4 | 5 | # Copyright (C) 2004-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ rm 22 | 23 | mkdir a b || framework_failure_ 24 | touch a/f b/f || framework_failure_ 25 | 26 | 27 | rm -r a b || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/rm/f-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Test "rm -f" with a nonexistent file. 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | 22 | mkdir -p d || framework_failure_ 23 | 24 | rm -f d/no-such-file || fail=1 25 | 26 | Exit $fail 27 | -------------------------------------------------------------------------------- /tests/rm/i-never: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that rm --interactive=never works does not prompt, even for 3 | # an unwritable file. 4 | 5 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ rm 22 | skip_if_root_ 23 | 24 | touch f || framework_failure_ 25 | chmod 0 f || framework_failure_ 26 | touch exp || framework_failure_ 27 | 28 | 29 | rm --interactive=never f > out || fail=1 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/rm/ignorable: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that rm -f existing-non-dir/anything exits successfully 3 | 4 | # Copyright (C) 2006-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | skip_if_root_ 22 | 23 | touch existing-non-dir || framework_failure_ 24 | 25 | 26 | # With coreutils-6.3, this would exit nonzero. It should not. 27 | # Example from Andreas Schwab. 28 | rm -f existing-non-dir/f > out 2>&1 || fail=1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /tests/rm/one-file-system2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Verify --one-file-system does delete within a file system 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | 22 | mkdir -p a/b 23 | 24 | rm --one-file-system -rf a || fail=1 25 | test -d a && fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/rm/rm4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that 'rm dir' fails without --recursive 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | skip_if_root_ 22 | 23 | mkdir dir || framework_failure_ 24 | 25 | 26 | # This should fail. 27 | rm dir > /dev/null 2>&1 && fail=1 28 | 29 | test -d dir || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /tests/rm/sunos-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure that rm -r '' fails. 3 | 4 | # Copyright (C) 1997-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | 20 | # On SunOS 4.1.3, running rm -r '' in a nonempty directory may 21 | # actually remove files with names of entries in the current directory 22 | # but relative to '/' rather than relative to the current directory. 23 | 24 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 25 | print_ver_ rm 26 | 27 | rm -r '' > /dev/null 2>&1 && fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/rm/unread2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # exercise one small part of remove.c 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | skip_if_root_ 22 | 23 | mkdir -p a/b || framework_failure_ 24 | chmod u-r a 25 | 26 | 27 | # This should fail. 28 | rm -rf a > out 2>&1 && fail=1 29 | cat <<\EOF > exp 30 | rm: cannot remove 'a': Permission denied 31 | EOF 32 | 33 | compare exp out || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /tests/rm/v-slash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # avoid extra slashes in --verbose output 3 | 4 | # Copyright (C) 2007-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rm 21 | 22 | mkdir a || framework_failure_ 23 | touch a/x || framework_failure_ 24 | 25 | 26 | rm --verbose -r a/// > out || fail=1 27 | cat <<\EOF > exp || fail=1 28 | removed 'a/x' 29 | removed directory: 'a' 30 | EOF 31 | 32 | compare exp out || fail=1 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /tests/rmdir/ignore: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure rmdir's --ignore-fail-on-non-empty option works 3 | 4 | # Copyright (C) 1999-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rmdir 21 | 22 | cwd=$(pwd) 23 | mkdir -p "$cwd/a/b/c" "$cwd/a/x" || framework_failure_ 24 | 25 | rmdir -p --ignore-fail-on-non-empty "$cwd/a/b/c" || fail=1 26 | # $cwd/a/x should remain 27 | test -d "$cwd/a/x" || fail=1 28 | # $cwd/a/b and $cwd/a/b/c should be gone 29 | test -d "$cwd/a/b" && fail=1 30 | test -d "$cwd/a/b/c" && fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/rmdir/t-slash: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure rmdir -p works on a directory specified with a trailing slash 3 | 4 | # Copyright (C) 2002-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ rmdir 21 | 22 | mkdir dir || framework_failure_ 23 | 24 | 25 | # Prior to coreutils-4.5.2, this would fail with the following: 26 | # rmdir: 'dir': No such file or directory 27 | rmdir -p dir/ || fail=1 28 | 29 | Exit $fail 30 | -------------------------------------------------------------------------------- /tests/sample-test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # FIXME 3 | 4 | # Copyright (C) 2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ FIXME 21 | 22 | # FIXME: skip_if_root_ 23 | # FIXME: require_root_ 24 | 25 | # If used, these must *follow* init.sh. 26 | # FIXME: cleanup_() { rm -rf "$other_partition_tmpdir"; } 27 | # FIXME: . "$abs_srcdir/other-fs-tmpdir" 28 | 29 | FIXME > out || fail=1 30 | cat <<\EOF > exp || fail=1 31 | FIXME 32 | EOF 33 | 34 | compare exp out || fail=1 35 | 36 | Exit $fail 37 | -------------------------------------------------------------------------------- /tests/split/guard-input: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure split doesn't overwrite input with output. 3 | 4 | # Copyright (C) 2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ split 21 | 22 | seq 10 | tee exp-1 > xaa 23 | ln -s xaa in2 24 | ln xaa in3 25 | 26 | split -C 6 xaa && fail=1 27 | split -C 6 in2 && fail=1 28 | split -C 6 in3 && fail=1 29 | split -C 6 - < xaa && fail=1 30 | 31 | compare exp-1 xaa || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/tail-2/pipe-f: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that :|tail -f doesn't hang, per POSIX 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ tail 21 | 22 | echo foo | timeout 10 tail -f -c3 > out || fail=1 23 | echo oo > exp || fail=1 24 | 25 | compare exp out || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/tail-2/proc-ksyms: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Prior to textutils-2.0.17, 'tail /proc/ksyms' would segfault on Linux. 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ tail 21 | 22 | 23 | ksyms=/proc/ksyms 24 | if test -r $ksyms; then 25 | tail $ksyms > /dev/null || fail=1 26 | fi 27 | 28 | Exit $fail 29 | -------------------------------------------------------------------------------- /tests/tail-2/start-middle: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Verify that tail works even when it's reading from a file 3 | # that is not at its beginning. Based on a report from John Roll. 4 | 5 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 21 | print_ver_ tail 22 | 23 | (echo 1; echo 2) > k || framework_failure_ 24 | 25 | 26 | sh -c 'read x; tail' < k > out || fail=1 27 | cat < exp 28 | 2 29 | EOF 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/touch/60-seconds: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # touch -t would mistakenly reject a time specifying "60" seconds 3 | 4 | # Copyright (C) 2009-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ touch 21 | 22 | echo 60.000000000 > exp || framework_failure_ 23 | 24 | 25 | # Before coreutils-7.7, this would fail, complaining of 26 | # an 'invalid date format'. Specifying 60 seconds *is* valid. 27 | TZ=UTC0 touch -t 197001010000.60 f || fail=1 28 | 29 | stat --p='%.9Y\n' f > out || fail=1 30 | 31 | compare exp out || fail=1 32 | 33 | Exit $fail 34 | -------------------------------------------------------------------------------- /tests/touch/dir-1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure touch can operate on a directory. 3 | # This was broken in the 4.0[efg] test releases. 4 | 5 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 6 | print_ver_ touch 7 | 8 | touch . || fail=1 9 | Exit $fail 10 | -------------------------------------------------------------------------------- /tests/touch/fail-diag: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # make sure touch gives reasonable diagnostics 3 | 4 | # Copyright (C) 2001-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ touch 21 | skip_if_root_ 22 | 23 | file=/no-such-dir/file 24 | 25 | touch $file > out 2>&1 && fail=1 26 | cat < exp 27 | touch: cannot touch '$file': No such file or directory 28 | EOF 29 | 30 | compare exp out || fail=1 31 | 32 | Exit $fail 33 | -------------------------------------------------------------------------------- /tests/touch/fifo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Make sure touch works on fifos without hanging. 3 | 4 | # Copyright (C) 2000-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ touch 21 | 22 | mkfifo_or_skip_ fifo 23 | 24 | 25 | touch fifo || fail=1 26 | 27 | Exit $fail 28 | -------------------------------------------------------------------------------- /tests/touch/read-only: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ensure that touch can operate on read-only files 3 | 4 | # Copyright (C) 2005-2012 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | 19 | . "${srcdir=.}/init.sh"; path_prepend_ ../src 20 | print_ver_ touch 21 | skip_if_root_ 22 | 23 | : > read-only || framework_failure_ 24 | chmod 444 read-only || framework_failure_ 25 | 26 | 27 | touch read-only || fail=1 28 | 29 | touch - 1< read-only 2> /dev/null && { test ! -f - || fail=1; } 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /thanks-gen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -nl 2 | # Use Perl's multi-byte alignment code, via sprintf, while 3 | # performing a rudimentary check for duplicate names and 4 | # removing duplicate name,email pairs. 5 | use Encode; 6 | 7 | BEGIN { my (%seen, %name) } 8 | 9 | chomp; 10 | my ($name, $email) = split '\0', decode ('UTF-8', $_); 11 | 12 | $seen{$name}++ 13 | and warn "$0: THANKS.in: duplicate name: $name\n"; 14 | 15 | print encode ('UTF-8', sprintf ('%-36s', $name)), $email 16 | unless $seen{"$name\0$email"}++; 17 | --------------------------------------------------------------------------------