RE: [newbie] Copy *.* to *.bak -- how?

2001-05-31 Thread Clarkson, Nick

I believe in my very limited knowledge that the command is

mv oldfilename newfilename

e.g. mv mydocument mydocument.bak

Nick

-Original Message-
From: Benjamin Sher [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2001 04:37
To: Newbie
Subject: [newbie] Copy *.* to *.bak -- how?


Dear friends:

Let's say I have the following files:

File1
File2
File3
etc.

Now, normally to make a backup copy of each, I would do the following:

cp File1 File1.bk
cp File2 File2.bk
cp File3 file3.bk
etc.

My question: Is there a SINGLE command that would allow me to create backups

for hundreds of files within a directory at one blow, that is, so as to 
create the series of backups above:

File1 File1.bk
File2 File2.bk
File3 file3.bk
etc.

In other words, is there a command that would allow me to do this all at
once 
from within a directory rather than manually copy each file one at a time?

Thanks so very much.

Benjamin

-- 
Sher's Russian Web
http://www.websher.net
Benjamin and Anna Sher
[EMAIL PROTECTED]




RE: [newbie] Copy *.* to *.bak -- how?

2001-05-31 Thread Clarkson, Nick

Oops, sorry bout that, just got in and jumped the gun - you can write a
script to loop through the contents of a directory and perform commands on
the files therein, but I don't know it off the top of my head. 

Nick

-Original Message-
From: Benjamin Sher [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2001 04:37
To: Newbie
Subject: [newbie] Copy *.* to *.bak -- how?


Dear friends:

Let's say I have the following files:

File1
File2
File3
etc.

Now, normally to make a backup copy of each, I would do the following:

cp File1 File1.bk
cp File2 File2.bk
cp File3 file3.bk
etc.

My question: Is there a SINGLE command that would allow me to create backups

for hundreds of files within a directory at one blow, that is, so as to 
create the series of backups above:

File1 File1.bk
File2 File2.bk
File3 file3.bk
etc.

In other words, is there a command that would allow me to do this all at
once 
from within a directory rather than manually copy each file one at a time?

Thanks so very much.

Benjamin

-- 
Sher's Russian Web
http://www.websher.net
Benjamin and Anna Sher
[EMAIL PROTECTED]




Re: [newbie] Copy *.* to *.bak -- how?

2001-05-31 Thread Nico Krzebek

Have a look at the man page of mmv (multiple move).

Nico

On Thursday 31 May 2001 05:36, you wrote:
 Dear friends:

 Let's say I have the following files:

 File1
 File2
 File3
 etc.

 Now, normally to make a backup copy of each, I would do the following:

 cp File1 File1.bk
 cp File2 File2.bk
 cp File3 file3.bk
 etc.

 My question: Is there a SINGLE command that would allow me to create
 backups for hundreds of files within a directory at one blow, that is, so
 as to create the series of backups above:

 File1 File1.bk
 File2 File2.bk
 File3 file3.bk
 etc.

 In other words, is there a command that would allow me to do this all at
 once from within a directory rather than manually copy each file one at a
 time?

 Thanks so very much.

 Benjamin




Re: [newbie] Copy *.* to *.bak -- how?

2001-05-31 Thread Paul

It was Thu, 31 May 2001 12:23:30 +0800 when newbie-mandrake wrote:

try something like

bash# for i in *; do cp $i $.bak; done

for i in *; do cp $i $i.bak; done

Note the i in front of the second $
Paul

--
Only passions, great passions,
can elevate the soul to great things.
-Denis Diderot

http://nlpagan.net -  Registered Linux User 174403
   Linux Mandrake 7.2 - Sylpheed 0.4.66




[newbie] Copy *.* to *.bak -- how?

2001-05-30 Thread Benjamin Sher

Dear friends:

Let's say I have the following files:

File1
File2
File3
etc.

Now, normally to make a backup copy of each, I would do the following:

cp File1 File1.bk
cp File2 File2.bk
cp File3 file3.bk
etc.

My question: Is there a SINGLE command that would allow me to create backups 
for hundreds of files within a directory at one blow, that is, so as to 
create the series of backups above:

File1 File1.bk
File2 File2.bk
File3 file3.bk
etc.

In other words, is there a command that would allow me to do this all at once 
from within a directory rather than manually copy each file one at a time?

Thanks so very much.

Benjamin

-- 
Sher's Russian Web
http://www.websher.net
Benjamin and Anna Sher
[EMAIL PROTECTED]




Re: [newbie] Copy *.* to *.bak -- how?

2001-05-30 Thread newbie-mandrake

try something like

bash# for i in *; do cp $i $.bak; done

sherwin

[EMAIL PROTECTED] writes:
Dear friends:

Let's say I have the following files:

File1
File2
File3
etc.

Now, normally to make a backup copy of each, I would do the following:

cp File1 File1.bk
cp File2 File2.bk
cp File3 file3.bk
etc.

My question: Is there a SINGLE command that would allow me to create
backups 
for hundreds of files within a directory at one blow, that is, so as to 
create the series of backups above:

File1 File1.bk
File2 File2.bk
File3 file3.bk
etc.

In other words, is there a command that would allow me to do this all at
once 
from within a directory rather than manually copy each file one at a time?

Thanks so very much.