On Friday 22 August 2003 07:32 pm, Udo Rader 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}
>
> Yes, I know this doesn't work, but is there any other efficient way
> to do this in bash?
>
> happy hacking
>
> udo

Look at ls's -I option (aka --ignore=PATTERN). For example:
        ls -l -I no_not_this_one  /opt/too_many_files/

Arn


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to