From dac5f12c6ed1225bfb8043d9ff7227d29439a955 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 17 Feb 2009 13:16:54 +0100 Subject: install: add --compare (-C) option to install file only when necessary * src/install.c (have_same_content): New function to compare files content. (extra_mode): New function checking for non-permission bits in mode. (need_copy): New function to check if copy is necessary. (main): Handle new option --compare (-C). (copy_file): Skip file copying if not necessary. (usage): Show new option --compare (-C) in --help. * tests/install/install-C: Basic tests for install --compare (-C). * tests/install/install-C-root: Tests requiring root privileges. * tests/install/install-C-selinux: Tests requiring SELinux. * tests/Makefile.am: Add new tests for install --compare (-C). * doc/coreutils.texi: Document new install option --compare (-C). * NEWS: Mention the change. --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 9de4f256d..4f8081396 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,11 @@ GNU coreutils NEWS -*- outline -*- dd accepts iflag=cio and oflag=cio to open the file in CIO (concurrent I/O) mode where this feature is available. + install accepts a new option, --compare (-C): compare each pair of source + and destination files, and if the destination has identical content and + any specified owner, group, permissions, and possibly SELinux context, then + do not modify the destination at all. + ls --color now highlights hard linked files, too stat -f recognizes the Lustre file system type -- cgit v1.2.3-70-g09d2