[NBLUG/talk] Create a range of files with cp
Ron Wickersham
rjw at alembic.com
Fri Jun 13 11:58:36 PDT 2003
yes that works in csh and i presume in bash as well.
it's not really cp that's doing the work, the shell reads your range and
sends the expanded list to the cp command.
so if you have a thousand files like sm000.jpg thru sm999.jpg and want
to copy sm 320.jpg and sm323.jpg thru sm327.jpg then
cp sm320.jpg sm32[3-7].jpg destination.directory
will get the 6 files you want.
-ron
On Fri, 13 Jun 2003, Mark Street wrote:
> For the life of me I can't remember how to create a range of files with cp.
>
> something like cp file1 file[3-99]
>
> anyone know the syntax on this one???
>
>
> --
> Mark Street, D.C.
More information about the talk
mailing list