[SATLUG] Deleting files

Jennie Haywood jehaywood at gmail.com
Thu Dec 24 06:47:02 CST 2009

use some incantation of  'find' with some regular expressions

start with this and play with it:

find / -type f -exec echo {} \;

or you can ls -alR the directory, redirect to a file or a grep, grep for the
file types you want to delete then pass it in a pipe to rm.

On Thu, Dec 24, 2009 at 6:30 AM, Geoff <geofff at w5omr.shacknet.nu> wrote:

> First off, Merry Christmas, everyone.  Safe holiday travels, if you
> intend to do so.
> 2nd, I'm a Ham Radio operator.  I've recently gotten active in APRS
> (Automatic Position Reporting System) via ham radio.
> Xastir (as far as I can tell) is the only Native Linux APRS
> client/tracking software package available.
> I found a whole BUNCH of maps, but after lots of research and
> conversation with other hams, I'm finding that there are -many- files
> that are simply redundant and more than that, they're not necessary.
> The directory structure of the maps is broken down by states, and
> counties for each state.
> all directories contain .shp files (shape).
> linux:/usr/share/xastir/maps/TIGER2008/48_TEXAS # ls *.shp
> tl_2008_48_bg00.shp      tl_2008_48_cousub.shp
> tl_2008_48_placeec.shp  tl_2008_48_tabblock.shp
> tl_2008_48_cd108.shp     tl_2008_48_cousub00.shp
> tl_2008_48_puma100.shp  tl_2008_48_tabblock00.shp
> tl_2008_48_cd110.shp     tl_2008_48_elsd.shp
> tl_2008_48_puma500.shp  tl_2008_48_tract00.shp
> tl_2008_48_county.shp    tl_2008_48_elsd00.shp
> tl_2008_48_scsd.shp     tl_2008_48_unsd.shp
> tl_2008_48_county00.shp  tl_2008_48_place.shp
> tl_2008_48_sldl.shp     tl_2008_48_unsd00.shp
> tl_2008_48_countyec.shp  tl_2008_48_place00.shp   tl_2008_48_sldu.shp
> All I need are
> pointlm
> tabblock00
> and
> vtd00
> The question is:
> How do I go to the root of the maps dir, and tell it
> rm -r *.shp except pointlm, tabblock00, vid00
> is it that easy?  rm --help wasn't that helpful.
> Man rm didn't answer my questions, either.
> Thanks!
> -Geoff
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> --
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
> Powered by Rackspace (www.rackspace.com)

Jennie Haywood
Everyone is crazy. It's just a matter of degree.
The oak tree in your backyard is just a nut that held its ground.

More information about the SATLUG mailing list