Files as files

From: Pete Turnbull <pete_at_dunnington.u-net.com>
Date: Thu Jun 11 22:47:36 1998

On Jun 11, 13:43, Doug Yowza wrote:
> On Thu, 11 Jun 1998, Pete Turnbull wrote:

> > Quickest general method is "rm -i *", though you may sometimes need
> > "rm -i .*" instead/as well.

It doesn't matter for "rm" since it won't delete directories unless you add
"-r" but for some other commands , "xx .?*" may be preferable to "xx .*".

> If you had a file named "-f" in your directory, then "rm -i *" would
> happily delete all of the files in the directory without prompting you.
>
> "rm -i ./*" would be better, but would not work for files with control
> characters or spaces.

It does on SystemV-based systems, and others I've tried. And "rm -i *"
prompts even with "-f".

> If you wanted to stick with the "-i" approach, then "cd .. ; rm -r -i
dir"
> would be the best bet (assuming your rm had a -r option to recurse).

AFAIK, all rm's have -r.

-- 
Pete						Peter Turnbull
						Dept. of Computer Science
						University of York
Received on Thu Jun 11 1998 - 22:47:36 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:31:04 BST