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:59 PM
Jussi Lehtola
Default using rm *.rpm but keep some files?

On Sun, 01 Jan 2012 12:56:20 +0000
Frank Murphy <frankly3d@gmail.com> wrote:
> I'm trying to remove rpms from my local repo.
> But keep some named files.
> Would this work:
> find /path/to/repo/*.rpm | grep -v "foo* bar*" | rm *.rpm

Simple solution:

mkdir tmp
mv /path/to/repo/foo* /path/to/repo/bar* tmp
find /path/to/repo/ -name *.rpm -delete
mv tmp/* /path/to/repo/

Jussi Lehtola
Fedora Project Contributor
users mailing list
To unsubscribe or change subscription options:
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 05:15 AM.

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