Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2009 15:35:52 +0100
From:      t-u-t <>
Subject:   shell commands - exclusion
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
hi, i don't know if this is a freak question, but i was looking around to
see if this is possible, and what the convention would be.

if i have say one (or even two) single file/directories among many others,
and i want to perform any said function like cp, mv, rm, etc.. , to all
other files except that one or two, is there a way to do that in a single
rm -r * {-except foo1 foo15}

and if there is, could the same be applied to other similar batch (?)
operations, like pkg_delete -f "*" { except firefox3 wine thunderbird }

i'm a bit new to the shell (took me a while to figure out *ls* and *ls |
more*), but i can't find anything from google cuz i don't know what this
would be called in the first place.

otherwise is it better to protect them with chflags or other trickery?

thanks in advance

Want to link to this message? Use this URL: <>