Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
24c0f738 |
| 28-Oct-2004 |
Xin LI <delphij@FreeBSD.org> |
Add -I, an option that asks for confirmation once if recursively removing directories or if more than 3 files are listed in the command line.
This feature is intended to provide a safe net but not b
Add -I, an option that asks for confirmation once if recursively removing directories or if more than 3 files are listed in the command line.
This feature is intended to provide a safe net but not being too annoying like having "rm -i" for every deleting operations, and is generally good for both newbies and power users, preventing them from being so easily run into ``rm -rf /'', ``rm -rf *'' and so forth.
Originally implemented by Matthew Dillon for DragonFly, plus some improvements done by various DragonFly contributors.
Approved by: murray (mentor; the original dillon's version) Discussed with: des Obtained from: DragonFly's bin/rm/ rm.c rev. 1.4 - 1.8 rm.1 rev. 1.3 - 1.4 MFC After: 1 month
show more ...
|
#
3f91ab92 |
| 04-Oct-2004 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
The previous commit added code to rm(1) to warn about and remove any occurrences of "/" in the argument list. This corresponds to Enhancement Request Number 5 in the Austin Group TC2 Aardvark's XCU
The previous commit added code to rm(1) to warn about and remove any occurrences of "/" in the argument list. This corresponds to Enhancement Request Number 5 in the Austin Group TC2 Aardvark's XCU Defects Report (<URL:http://www.opengroup.org/austin/aardvark/finaltext/xcubug.txt>). Further discussion is available in the Austin Group mailing list archives (<URL:http://www.opengroup.org/austin/mailarchives/>, "Defect in XCU rm") and for Austin Group members, in the Austin Group Interpretations archive (<URL:http://www.opengroup.org/austin/interps/>, AI-019)
This commit makes that check conditional on !POSIXLY_CORRECT, since it is not strictly correct according to the current version of the standard (but is expected to be correct according to the next version, and has already been adopted by Solaris).
show more ...
|
#
68ef5f71 |
| 04-Oct-2004 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Find out how flame-proof my underwear really is.
|
#
c335b1ec |
| 04-Oct-2004 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Whitespace cleanup.
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
6195fb41 |
| 06-Apr-2004 |
Mark Murray <markm@FreeBSD.org> |
Remove clause 3 from the UCB licenses.
OK'ed by: imp, core
|
Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0 |
|
#
b800f53d |
| 01-Jan-2004 |
Jun Kuriyama <kuriyama@FreeBSD.org> |
o Fix a style bug and poor wording in comment. o When fts_read() cannot stat the file, it can't be unlinked. At that case, don't display error message when -f flag is used.
Obtained from: bde PR:
o Fix a style bug and poor wording in comment. o When fts_read() cannot stat the file, it can't be unlinked. At that case, don't display error message when -f flag is used.
Obtained from: bde PR: kern/16815, bin/35842 Reported by: kuriyama, Aleksandr A. Babaylov <.@babolo.ru>
show more ...
|
#
f3761dee |
| 10-Nov-2003 |
Guido van Rooij <guido@FreeBSD.org> |
When the P flag is set (i.e. Overwrite regular files before deleting them), do only unlink the file if we could indeed overwrite the file. Old behaviour: rm -P /tmp/foo (foo mode 0444) would NOT over
When the P flag is set (i.e. Overwrite regular files before deleting them), do only unlink the file if we could indeed overwrite the file. Old behaviour: rm -P /tmp/foo (foo mode 0444) would NOT overwrite foo, but still delete it (with a warning: rm: foo: Permission denied) New behaviour: Just the EPERM warning, but no deletion
Reviewed by: bde
show more ...
|
#
8f1f4338 |
| 08-Nov-2003 |
Bruce Evans <bde@FreeBSD.org> |
1. Fixed leakage of a file descriptor for every non-fatal failure in rm_overwrite() (for rm -P).
2. Print the file name in the error message for (fatal) malloc() failures in rm_overwrite(). I
1. Fixed leakage of a file descriptor for every non-fatal failure in rm_overwrite() (for rm -P).
2. Print the file name in the error message for (fatal) malloc() failures in rm_overwrite(). I first thought that malloc() failures should be non-fatal since they don't prevent proceeding the the next file, but making them non-fatal would normally give too much output for rm -Pr on a large tree in the unlikely event that even one occurs, since the malloc()ed amounts are usually the same. Just print the file name since the malloc()ed amounts are not always the same and it doesn't hurt to know where rm was when it quit.
Submitted by: guido ((1) and original version of (2))
show more ...
|
Revision tags: release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0 |
|
#
09a80d48 |
| 01-May-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Quiet warnings about copyright[].
|
Revision tags: release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs |
|
#
7d971bbf |
| 21-Aug-2002 |
Tom Rhodes <trhodes@FreeBSD.org> |
s/filesystem/file system/ as discussed on -developers
|
Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1 |
|
#
90833c99 |
| 12-Jul-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Complain if more than one file argument is given to unlink(1) like we did before I made unlink use getopt().
|
#
5ad9e45f |
| 10-Jul-2002 |
Matthew Dillon <dillon@FreeBSD.org> |
err() is documented as allowing NULL for the format string but GCC isn't happy about it any more so change the usage to make buildworld work again.
|
Revision tags: release/4.6.0_cvs |
|
#
2749b141 |
| 30-Jun-2002 |
David E. O'Brien <obrien@FreeBSD.org> |
Consistently use FBSDID
|
#
e9393a92 |
| 30-May-2002 |
Tim J. Robbins <tjr@FreeBSD.org> |
Reject options, handle "--" correctly in unlink(1).
|
#
ebd43244 |
| 16-May-2002 |
Tom Rhodes <trhodes@FreeBSD.org> |
Consistancy check s/file system/filesystem/
Reviewed by: brian
|
#
fc69394f |
| 14-Feb-2002 |
Warner Losh <imp@FreeBSD.org> |
Move user_from_uid to pwd.h Move group_from_gid to grp.h Remove from stdlib.h Make the prototypes match the code Fix rm and mv to include new files.
NetBSD has these defined in those files, and othe
Move user_from_uid to pwd.h Move group_from_gid to grp.h Remove from stdlib.h Make the prototypes match the code Fix rm and mv to include new files.
NetBSD has these defined in those files, and others too that I've not done.
Approved by: terminal room kabal Reviewed by: jhb, phk
show more ...
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
46251dde |
| 02-Feb-2002 |
Warner Losh <imp@FreeBSD.org> |
o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int arg
o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are.
show more ...
|
#
69393d06 |
| 14-Dec-2001 |
Luigi Rizzo <luigi@FreeBSD.org> |
Add prototypes for main() so that these programs compile with -Werror (which somehow now seems to be the default for compiling -current). This error popped up while doing a PicoBSD cross-compile on a
Add prototypes for main() so that these programs compile with -Werror (which somehow now seems to be the default for compiling -current). This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system, it may well be that there are other apps which have similar problems, but I did not spot them as they are not included in my picobsd config.
Whether adding prototypes for main() is the correct solution or not I have no idea, a request to -current on the matter went basically unanswered. Those who have better ideas are welcome to back this out and replace it with the correct fix.
show more ...
|
#
754e501c |
| 13-Jun-2001 |
Ruslan Ermilov <ru@FreeBSD.org> |
Removed wrong cast for fts_open()'s third argument.
|
Revision tags: release/4.3.0_cvs, release/4.3.0 |
|
#
b6f80a8e |
| 20-Dec-2000 |
David E. O'Brien <obrien@FreeBSD.org> |
Display pathname of item being rm'ed.
Submitted by: Peter Pentchev <roam@orbitel.bg>
|
Revision tags: release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs |
|
#
141d77b8 |
| 17-Jun-2000 |
Josef Karthauser <joe@FreeBSD.org> |
Switch over to using the new fflagstostr and strtofflags library calls.
|
#
69757cf9 |
| 01-May-2000 |
Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org> |
Remove unused #include.
|
Revision tags: release/4.0.0_cvs |
|
#
418d67b0 |
| 05-Feb-2000 |
Josef Karthauser <joe@FreeBSD.org> |
Revert part of the last commit, remove {g|s}etflags from the libc interface, and statically link them to the programs using them. These functions, upon reflection and discussion, are too generically
Revert part of the last commit, remove {g|s}etflags from the libc interface, and statically link them to the programs using them. These functions, upon reflection and discussion, are too generically named for a library interface with such specific functionality. Also the api that they use, whilst ok for private use, isn't good enough for a libc function.
Additionally there were complications with the build/install-world process. It depends heavily upon xinstall, which got broken by the change in api, and caused bootstrap problems and general mayhem.
There is work in progress to address future problems that may be caused by changes in install-chain tools, and better names for {g|s}etflags can be derived when some future program requires them. For now the code has been left in src/lib/libc/gen (it started off in src/bin/ls).
It's important to provide library functions for manipulating file flag strings if we ever want this interface to be adopted outside of the source tree, but now isn't necessarily the right moment with 4.0-release just around the corner.
Approved: jkh
show more ...
|
#
18c0eedd |
| 27-Jan-2000 |
Josef Karthauser <joe@FreeBSD.org> |
Historically file flags (schg, uschg, etc) have been converted from string to u_long and back using two functions, flags_to_string and string_to_flags, which co-existed with 'ls'. As time has progre
Historically file flags (schg, uschg, etc) have been converted from string to u_long and back using two functions, flags_to_string and string_to_flags, which co-existed with 'ls'. As time has progressed more and more other tools have used these private functions to manipulate the file flags.
Recently I moved these functions from /usr/src/bin/ls to libutil, but after some discussion with bde it's been decided that they really ought to go in libc.
There are two already existing libc functions for manipulating file modes: setmode and getmode. In keeping with these flags_to_string has been renamed getflags and string_to_flags to setflags.
The manual page could probably be improved upon ;)
show more ...
|
#
d71e172a |
| 20-Dec-1999 |
Sheldon Hearn <sheldonh@FreeBSD.org> |
Add link(1) and unlink(1) as special cases of ln(1) and rm(1) respectively, in accordance with SUSv2.
This differs from the approach taken in NetBSD, but provides less obscure error messages in at l
Add link(1) and unlink(1) as special cases of ln(1) and rm(1) respectively, in accordance with SUSv2.
This differs from the approach taken in NetBSD, but provides less obscure error messages in at least the EISDIR case and does not take up additional disk space for new binaries.
PR: 13071 PR: 13074 Requested by: James Howard <howardjp@wam.umd.edu>
show more ...
|