From 39b1aee2e1d09ee8c51b400d3756e357ecfe9d00 Mon Sep 17 00:00:00 2001 From: Joseph Koshy Date: Fri, 25 Nov 2011 21:50:33 +0530 Subject: [PATCH] fix rm -f "/bin/rm" should not issue a usage message if the "-f" option was specified. --- commands/cp/cp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/cp/cp.c b/commands/cp/cp.c index f29e78389..75cf43107 100644 --- a/commands/cp/cp.c +++ b/commands/cp/cp.c @@ -1320,7 +1320,11 @@ int main(int argc, char **argv) switch (action) { case REMOVE: - if (i == argc) usage(); + if (i == argc) { + if (fflag) + exit(0); + usage(); + } break; case LINK: /* 'ln dir/file' is to be read as 'ln dir/file .'. */ -- 2.44.0