Linux: Bash Delete All Files In Directory Except Few

in Categories , , last updated June 5, 2014

I‘m a new Linux system user. I need to cleanup in a download directory i.e. delete all files from ~/Downloads/ folders except the following types:

*.iso – All iso images files.
*.zip – All zip files.

How do I delete all file except some in bash shell on a Linux, OS X or Unix-like systems?

RHN yum command: Unable to read consumer identity Warning and Solution

in Categories , last updated November 17, 2012

I am using yum update command with RHN to upgrade packages installed on my server, but getting the following warning on screen :

yum update -y
Loaded plugins: product-id, protectbase, rhnplugin, security, subscription manager:
Updating certificate-based repositories.
Unable to read consumer identity
0 packages excluded due to repository protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
...&ltsnip>

How do I get rid of this warning /error under RHEL 6 server?