FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 01-01-2012, 12:15 PM
Frank Murphy
 
Default SOLVED using rm *.rpm but keep some files?

On 01/01/12 13:10, Theodore Papadopoulo wrote:


Would this work: find /path/to/repo/*.rpm | grep -v "foo* bar*" |
rm *.rpm



Make it

find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs rm

and that should work (not tested).


Gave it a test, it works.
Thanks.


--
Regards,

Frank Murphy
UTF_8 Encoded
Friend of fedoraproject.org
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-01-2012, 10:57 PM
Cameron Simpson
 
Default SOLVED using rm *.rpm but keep some files?

On 01Jan2012 13:15, Frank Murphy <frankly3d@gmail.com> wrote:
| On 01/01/12 13:10, Theodore Papadopoulo wrote:
| >>Would this work: find /path/to/repo/*.rpm | grep -v "foo* bar*" |
| >>rm *.rpm
| >
| >Make it
| >
| >find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs rm
| >
| >and that should work (not tested).
| >
| Gave it a test, it works.
| Thanks.

On the subject of testing, I find it VERY useful to phrase tests like
this:

find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs echo rm

Remove the "echo" when happy.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

If the Universe is constantly expanding, why can't I ever find a parking space?
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-02-2012, 09:52 AM
Frank Murphy
 
Default SOLVED using rm *.rpm but keep some files?

On 01/01/12 23:57, Cameron Simpson wrote:


On the subject of testing, I find it VERY useful to phrase tests like
this:

find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs echo rm



Having arthritis in the hand:
find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs
same result less typing

Have a healthy and happy one.

--
Regards,

Frank Murphy
UTF_8 Encoded
Friend of fedoraproject.org
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 01-02-2012, 01:21 PM
Roberto Ragusa
 
Default SOLVED using rm *.rpm but keep some files?

On 01/02/2012 12:57 AM, Cameron Simpson wrote:

> On the subject of testing, I find it VERY useful to phrase tests like
> this:
>
> find /path/to/repo/*.rpm -print | grep -v "foo* bar*" | xargs echo rm
>
> Remove the "echo" when happy.

My usual approach is a little variation, I add "|sh" at the end.

The logic is "ok, this is what I would have written manually".

--
Roberto Ragusa mail at robertoragusa.it
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 02:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org