[hcs-d] deleting files
brandon.k.liu at gmail.com
Tue May 29 16:26:55 EDT 2012
Thanks, Jim! That extra info is definitely good to keep in mind as well.
On Tue, May 29, 2012 at 11:25 AM, Jim Danz <danz at fas.harvard.edu> wrote:
> Not to beat a dead horse, but keep in mind that -f doesn't *just* override
> From the rm man page:
> -f Attempt to remove the files without prompting for confirma-
> tion, regardless of the file's permissions. If the file
> not exist, do not display a diagnostic message or modify
> exit status to reflect an error. The -f option overrides
> previous -i options.
> On Tue, May 29, 2012 at 12:46 AM, Brandon Liu <brandon.k.liu at gmail.com>
> > `rm -i` will ask you for a confirmation before it deletes the file. A
> lot of
> > people add the line `alias rm='rm -i'` to their .bashrc (or equivalent)
> > that they always get a confirmation before they delete something. Even if
> > you're using wildcards, rm will confirm with you for each individual file
> > deletion. If you're sure you know what you're doing and don't want to
> > 'y' for every file, you can still use `rm -f` and the -f flag will
> > the -i flag.
> > On Sun, May 27, 2012 at 12:28 PM, Robert Nishihara
> > <robertnishihara at gmail.com> wrote:
> >> Thanks guys.
> >> Jim, I didn't mean from a security perspective, I actually just meant
> >> the perspective of not accidentally deleting a lot of files. For
> >> if you use emacs, then you might want to run something like "rm *~",
> >> is pretty close to "rm *". Anyway, I ended up aliasing "clean" to "rm *~
> >> *#", so I don't have to do those things manually.
> >> On Sun, May 27, 2012 at 2:42 PM, Jim Danz <danz at fas.harvard.edu> wrote:
> >>> 'rm' should usually be what you want, with the caveat that it doesn't
> >>> actually destroy the contents of your files; it just removes their
> >>> entries and marks their disk blocks as free. So it's no good if you
> need to
> >>> prevent an adversary with physical access to your machine from being
> able to
> >>> read the contents of your deleted files.
> >>> Maybe you remember somebody cautioning you against always running 'rm
> >>> -rf' without being SURE that's what you meant to do? Or maybe you can
> >>> some Gmail searching to uncover the thread that you're remembering?
> >>> Separately, this is my first email to an HCS list as cruft. wtf :(
> >>> On May 27, 2012 9:17 AM, "Robert Nishihara" <robertnishihara at gmail.com
> >>> wrote:
> >>>> A while ago, I remember someone said not to delete files with 'rm'.
> >>>> do you guys delete files in practice?
> >>>> _______________________________________________
> >>>> hcs-discuss mailing list
> >>>> hcs-discuss at lists.hcs.harvard.edu
> >>>> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
> >> _______________________________________________
> >> hcs-discuss mailing list
> >> hcs-discuss at lists.hcs.harvard.edu
> >> https://lists.hcs.harvard.edu/mailman/listinfo/hcs-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hcs-discuss