As the doctor gone rogue

April 22, 2010

How do I delete a large chunk of file?

Filed under: bash, Wordpress — hypotheses @ 2:17 pm

Posting Source Code « Support — WordPress.com.

This might not be a good way to start a blog, but at least it gets me started about what I would like to do about my blog, and integrate this into part of my everyday work, which is writing some code/program/analysis in genetic epidemiology or statistical genetics. It should be an archive of examples and resources for readers.


## Here's a way to delete a large chuck of files which gives you error that "argument too long"

find .|grep 'merlin.*[(dat)|(freq)|(tbl)|(ped)|(map)]$' | xargs rm

– first the last part of grep enable you to match many types of file extension

– second : xargs allow you to execute any command to a long arguments that you parse to it “one by one”

Advertisements

1 Comment »

  1. Cool – -you can offer coding advice!

    Comment by Bev — April 22, 2010 @ 4:32 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: