Problems with rm -f

Ace Stewart jstewart at rodan.acs.syr.edu
Wed May 15 05:08:16 AEST 1991


System: Sun 4/490 running 4.1_PSR_A

Problem: When running a "rm -f" on files that may or may not be in a
sub-directory, the -f doesn't seem to suppress the error output if a
file doesn't exist. Script as follows:

----------------
% ls .Mail/drafts			Listing of directory
1	2
3	,1
,4

% rm -f .Mail/drafts/,*			Remove the , files (temp files)
%					All okay!  :)

% rm -f .Mail/drafts/,*			Do it again, _problems!_
No match.
%
----------------

What the heck is the -f option there for if it still throws up at you
if files in a sub-directory don't exist? It works fine if you are _in_
a that directory (i.e. 'rm -f ,*'  run twice in the sub-directory
suppresses errors correctly)

Comments/suggestions/help? Am I doing something incredibly stupid?

--Ace


-- 
    Ace Stewart | Affiliation: Eastman Kodak Company, Rochester, New York
jstewart at rodan.acs.syr.edu jstewart at sunrise.bitnet jstewart at mothra.cns.syr.edu
   jstewart at sunspot.cns.syr.edu     ace at suvm.bitnet     rsjns at suvm.bitnet



More information about the Comp.unix.questions mailing list