[hcs-d] deleting files

Brandon Liu 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
> -i.
>
> 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
> does
>                 not exist, do not display a diagnostic message or modify
> the
>                 exit status to reflect an error.  The -f option overrides
> any
>                 previous -i options.
> """
>
>
> On Tue, May 29, 2012 at 12:46 AM, Brandon Liu <brandon.k.liu at gmail.com>
> wrote:
> > `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)
> so
> > 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
> type
> > 'y' for every file, you can still use `rm -f` and the -f flag will
> override
> > 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
> from
> >> the perspective of not accidentally deleting a lot of files. For
> instance,
> >> if you use emacs, then you might want to run something like "rm *~",
> which
> >> 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
> directory
> >>> 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
> try
> >>> 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'.
> How
> >>>> 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...
URL: http://lists.hcs.harvard.edu/pipermail/hcs-discuss/attachments/20120529/3d15e709/attachment.htm 


More information about the hcs-discuss mailing list