Matt Berlin on 26 Sep 2011 13:15:43 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] saw this on /. this morning.


Thanks -- that was what I was looking for.

Matt


On Mon, Sep 26, 2011 at 3:53 PM, Rich Freeman <r-plug@thefreemanclan.net> wrote:
On Mon, Sep 26, 2011 at 3:37 PM, Matt Berlin <arkestra@gmail.com> wrote:
> What i was getting at, is would it craw recursively through all dirs in
> root, or only dirs named like *.dll?

The latter.  Find everything in root named *.dll, then wipe it out,
whether a single file or a whole directory tree.

On most unix systems it would do nothing at all, since you are
unlikely to have anything named *.dll.

If you do ls /*.dll then whatever it lists is what you'll lose.

In unix the globbing is done before the command is executed.  So, bash
sees *.dll and replaces it with a list of files/directories, then
passes it to rm.  So, the -r has no effect on which files are selected
initially.

If you want to find and delete all the dll's on your system then
you'll need to use the find command. I always forget the 40 bazillion
command line options for find so I'd probably do find / | grep
'\.dll$' | xargs rm.   Replace the rm with an echo for a dry run.

Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug