Commit Graph

427 Commits

Author SHA1 Message Date
Jim Meyering
200aa48e15 * NEWS: Mention the improvement to sort. 2006-09-24 11:44:16 +00:00
Paul Eggert
2a01141018 * NEWS: Document fix for cp -i and mv -i.
* src/copy.c (copy_internal): With -i, prompt even if the source
is a directory and the destination is not.  This is required by
POSIX and gives the user a chance to bail out before failing.
* tests/cp/Makefile.am (TESTS): Add cp-i.
* tests/cp/cp-i: New file.
* tests/mv/Makefile.am (TESTS): Add i-5.
* tests/mv/i-5: New file.
2006-09-20 17:32:14 +00:00
Jim Meyering
fae30e1af9 * NEWS: Mention the chmod bug fix. 2006-09-20 13:30:55 +00:00
Jim Meyering
c9c0dc7bc6 * NEWS: Add a line for 6.3-cvs.
* configure.ac (AC_INIT): Bump to 6.3 and add "-cvs" suffix.
2006-09-18 13:01:09 +00:00
Jim Meyering
8cd9d29cfe duh 2006-09-18 07:51:48 +00:00
Jim Meyering
97f9240eaa *** empty log message *** 2006-09-18 07:51:33 +00:00
Jim Meyering
500fdd0af9 *** empty log message *** 2006-09-18 07:51:07 +00:00
Jim Meyering
7da3ac75c2 Version 6.2.
* NEWS: Record the 6.2 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-09-18 05:58:55 +00:00
Paul Eggert
b67faf329c * NEWS: Document that mkdir -p and install -d now fork on occasion.
* bootstrap.conf (gnulib_modules): Add savewd.
* src/install.c: Include savewd.h.
(process_dir): New function.
(main, install_file_in_file_parents): Use it, along with the new
savewd module, to avoid some race conditions.
* src/mkdir.c: Include savewd.h.
(struct mkdir_options): New members make_ancestor_function, mode,
mode_bits.
(make_ancestor): Return 1 if the resulting directory is not readable.
(process_dir): New function.
(main): Use it, along with new savewd module, to avoid some
race conditions.  Fill in new slots of struct mkdir_options, so
that callees get the values.
* tests/install/basic-1: Test for coreutils 5.97 bug that was
fixed in coreutils 6.0, and which should still be fixed with
this change.
* tests/mkdir/p-3: Likewise.
2006-09-16 20:03:56 +00:00
Paul Eggert
5c81574ed5 tail now ignores the -f option if POSIXLY_CORRECT is set,
no file operand is given, and standard input is any FIFO.
2006-09-08 17:19:51 +00:00
Jim Meyering
d7619b5fe8 mv and "cp -r" no longer fail when invoked with two arguments
where the first one names a directory and the second name ends in
a slash and doesn't exist.  E.g., "mv dir B/", for nonexistent B,
now succeeds, once more. This reverts part of the 2004-06-27
change for 5.3.0.
* NEWS: Say the above.
* src/mv.c (target_directory_operand): Don't require (here)
that the target operand "look like" a directory.  This change
pushes the test down to the rename syscall level, where a
"mv dir existing-non-dir/" will mistakenly succeed on older systems
that ignore trailing slashes in the rename destination argument.
* src/cp.c (target_directory_operand): Likewise, but for cp.
* tests/mv/trailing-slash: Exercise the above fixes.
* tests/cp/trailing-slash: New file.
* tests/cp/Makefile.am (EXTRA_DIST): Add trailing-slash.
2006-09-08 17:08:53 +00:00
Jim Meyering
2809bfb8f7 (Infrastructure changes): make wording more accurate 2006-09-04 07:50:16 +00:00
Jim Meyering
5e451b260f * NEWS: Tweak the wording in the new change description so that
no one can think this change causes e.g., `rm -fr foo../' to fail.
2006-09-03 20:16:38 +00:00
Paul Eggert
b539762854 rm now rejects attempts to remove /, ./, and ../. 2006-09-03 02:50:41 +00:00
Jim Meyering
e7573e15d9 * NEWS: Mention this. 2006-08-27 19:46:26 +00:00
Jim Meyering
146af5fb13 Fix "mv --verbose --backup" so its output includes the
" (backup: foo.~1~)" suffix also when backing up a directory.
* NEWS: Report this bug fix.
* src/copy.c (emit_verbose): New function, factored out of...
(copy_internal): ...here.  Use the new function.
* tests/mv/backup-dir: Test for the above fix.
2006-08-26 15:53:24 +00:00
Jim Meyering
967e0c11ea "ls --color" would highlight other-writable and sticky directories
no differently than regular directories on a file system with
dirent.d_type support.
* NEWS: Say the above.
* src/ls.c (gobble_file): With --color, also stat the file when
we know it is a directory.
Derived from an anonymous one-line fix and bug report:
<https://savannah.gnu.org/bugs/?15043>.
* tests/ls/color-dtype-dir: New file.  Test for the above fix.
* tests/ls/Makefile.am (TESTS): Add color-dtype-dir.
2006-08-26 06:46:17 +00:00
Paul Eggert
882c0d8d35 * NEWS: printf supports the I flag.
* src/printf.c (print_formatted) [glibc 2.2 or later]: Likewise.
2006-08-23 23:38:27 +00:00
Jim Meyering
2594cd456d * NEWS: Mention the sweeping infrastructure changes. 2006-08-23 09:17:14 +00:00
Jim Meyering
11fd62b008 add -cvs suffix 2006-08-20 15:53:11 +00:00
Jim Meyering
1227e8c08b * NEWS: Add a line for 6.2-cvs.
* configure.ac (AC_INIT): Bump to 6.2 and add "-cvs" suffix.
2006-08-20 14:23:38 +00:00
Jim Meyering
929910e100 remove -cvs suffix, too 2006-08-19 19:35:28 +00:00
Jim Meyering
7b88d1ba67 * Version 6.1.
* NEWS: Record the 6.1 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-19 18:33:50 +00:00
Jim Meyering
6a15128cef *** empty log message *** 2006-08-19 17:37:28 +00:00
Jim Meyering
b35bd50ce6 * NEWS: Fix cp --sparse so that it preserves tail-end sparseness, even
when the file's apparent size is not a multiple of its block size.
* src/copy.c (copy_reg): Don't write a NUL before calling ftruncate.
For some file sizes, writing that single byte would unnecessarily
waste a few file blocks.  That write may have been necessary in the
early days of Linux, but now, removing it should be safe.
Based on a patch by Alan Curry: <http://bugs.debian.org/370792>
* tests/cp/sparse: New test for the above.
* tests/cp/Makefile.am (TESTS): Add sparse.

* tests/sparse-file: New file, essence factored out of...
* tests/du/8gb: ... here.  Use the new script.
2006-08-19 14:01:29 +00:00
Paul Eggert
218fa5c61b Add/fix copyright notices and adjust to latest GNU FDL. 2006-08-17 19:58:17 +00:00
Jim Meyering
734afd5f62 *** empty log message *** 2006-08-16 09:55:48 +00:00
Paul Eggert
9e2b97bf35 * NEWS: Mention that df exits with nonzero status if it generates
no output.  This change was in 6.0 but inadvertently unmentioned.
* doc/coreutils.texi (df invocation): df exits nonzero if it outpus
nothing.
* src/df.c (file_systems_processed): Renamed from n_valid_args, and now
a boolean.
(show_dev): Don't set it until we actually output something.
Print the header if this is the first output.
(main): Don't print a header, as that is now show_dev's job.
* tests/misc/Makefile.am (TESTS): Add df.
* tests/misc/df: New file.
2006-08-15 23:41:24 +00:00
Jim Meyering
d8139747b1 * NEWS: Add a line for 6.1-cvs.
* configure.ac (AC_INIT): Bump to 6.1 and add "-cvs" suffix.
2006-08-15 17:00:00 +00:00
Jim Meyering
3a246cc314 * Version 6.0 [unstable].
* NEWS: Record the 6.0 release date.
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
2006-08-15 11:12:07 +00:00
Paul Eggert
6767712f7e Add shuf. Mention new --random-source option for shred and sort.
Move "sort +1 -2" notice to the appropriate section, and clarify its
role with respect to POSIXLY_CORRECT.
2006-08-08 22:10:39 +00:00
Paul Eggert
6eb119a91e chmod now preserves setuid and setgid bits on directories
if you use a numeric mode with them clear, e.g., "chmod 755 DIR".
2006-07-28 07:27:56 +00:00
Paul Eggert
b7f9a7ed05 Clarify the "chmod 0500" news, and correct the vague
statements about compatibility with BSD.
2006-07-25 18:38:58 +00:00
Jim Meyering
2c5f6e6e2c mention yesterday's other ls bugfix 2006-07-21 08:58:00 +00:00
Jim Meyering
9e0a095be6 Fix another bug: ls --indicator-style=file-type would call
stat for a symlink, even though it wasn't always needed.
In some cases, that unnecessary stat would cause ls to fail.
* src/ls.c (gobble_file): Don't treat symlinks specially (in
requiring a stat syscall).  Remove the offending exclusion.
* NEWS: Mention the fix.
* tests/ls/stat-dtype: New file/test, for the above fix.
Also exercises the new df feature, below.
2006-07-21 08:49:24 +00:00
Paul Eggert
999eeed90f chmod, install, and mkdir now leave setgid and setuid bits
of directories alone unless you specify them explicitly.
install and mkdir now implement X correctly.
install now creates parent directories with mode 755, without
changing their owner or group.
2006-07-17 03:02:45 +00:00
Jim Meyering
1ac491f062 * NEWS: Mention that mv can now remove an empty destination directory,
and give an example.  Prompted by a report from Florent Bayle.
2006-07-07 06:38:36 +00:00
Paul Eggert
31acf81fa0 With no operand, 'tail -f' now silently ignores the '-f'
only if standard input is a FIFO or pipe and POSIXLY_CORRECT is set.
2006-07-01 23:53:05 +00:00
Paul Eggert
69f1a97138 seq defaults to a minimal fixed point format that does not lose
information if seq's operands are all fixed point decimal numbers.
You no longer need the `-f%.f' in `seq -f%.f 1048575 1024 1050623',
for example, since the default format now has the same effect.

seq now lets you use %a, %A, %E, %F, and %G formats.

seq now uses long double internally rather than double.
2006-07-01 00:11:23 +00:00
Paul Eggert
3869e29196 Support obsolete usages like "sort +1 -2" even when conforming to
POSIX 1003.1-2001.
2006-06-28 23:49:58 +00:00
Jim Meyering
78b166d1b1 * NEWS: rm no longer fails to remove an empty, unreadable directory
* src/remove.c (remove_cwd_entries): If we can't open a directory,
and the failure is not being ignored, try to remove the directory
with rmdir (aka unlinkat-with-AT_REMOVEDIR), in case it's empty.
Problem report and test case from Paul Eggert in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/7425>.
* tests/rm/empty-inacc: New test, for the above.
2006-06-26 13:02:01 +00:00
Jim Meyering
cc70571401 * NEWS: wc accepts a new option --files0-from=FILE, where FILE
contains a list of NUL-separated file names.

* src/wc.c: Include "readtokens.h".
(usage): Describe the new option, and adjust the `Usage':
with this option, no FILE may be specified on the command line.
(main): Handle the new option.
* tests/misc/wc-files0: New tests, for the above.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/Makefile.am (TESTS): Add wc-files0.
2006-06-25 18:26:09 +00:00
Jim Meyering
d9f0cce0f4 Mention the AIX-strndup-bug vs. dircolors workaround. 2006-06-10 09:41:39 +00:00
Jim Meyering
790892db65 Ensure that cat works with any of the options, -A -v -e -E -T,
when applied to files in /proc and /sys, even when the FIONREAD
ioctl produces nonsensical results.  Before this change, cat would
produce no output (or truncated output), for some linux kernels.

* src/cat.c (write_pending): New function, factored out of cat.
(cat): Also interpret a negative ioctl/FIONREAD count as indicating
that there are bytes to read.  Some versions of linux-2.6.16 do that.
Write any pending output before returning.
Reported by Dan Jacobson in <http://bugs.debian.org/370583>.
* NEWS: Mention this bug fix.
* tests/misc/cat-proc: New file.  Test for the above.
* tests/misc/Makefile.am (TESTS): Add cat-proc.
2006-06-08 20:13:37 +00:00
Paul Eggert
0038f24b9a The 'expr' command now detects and reports integer overflow. 2006-06-07 05:52:07 +00:00
Jim Meyering
6293c4ae50 `cp --link --no-dereference' now works also on systems where the
link system call cannot create a hard link to a symbolic link.
2006-06-03 09:04:05 +00:00
Jim Meyering
17fc4cd8ab *** empty log message *** 2006-05-27 15:13:35 +00:00
Jim Meyering
df91a82135 chgrp now supports --preserve-root, --no-preserve-root 2006-05-27 15:01:36 +00:00
Paul Eggert
32cea0d8ae Remove mention of --seed. 2006-05-25 16:48:05 +00:00
Jim Meyering
d523a83be5 *** empty log message *** 2006-05-21 22:04:34 +00:00