On Sat, 23 Aug 2003 02:32:35 +0200 Udo Rader <[EMAIL PROTECTED]> wrote:
> hi, > > I have a directory that contains several hundred files and I want to > copy them all except _one_ file. > > This sounds so easy yet still I am stuck or blind or stupid. Is there no > "not" operator in bash? > > If it were, some construct like the thing below could then list all > files in "/opt/too_many_files" except "no_not_this_one": > > % ls -l /opt/too_many_files/*{!no_not_this_one} % cp `ls /opt/too_many_files/* | grep -v no_not_this_one` destination This won't follow directories (just files); but you should get the idea... > Yes, I know this doesn't work, but is there any other efficient way to > do this in bash? You'll probably get other fancier solutions -- If one command won't do the job... think "pipe"... > happy hacking > > udo > >
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com