You want to first type "date --help|more" and read the options. The key
is the format command. For example, to change a file named x to include
the date at the end you could use:

mv x x-'date +%y-%m-%d'

or mv x x-'date +%D'

The first example will give you a file that looks like x-2001-03-24.
The second one will give a file that looks like x-03/24/01. Play around
with the various options to get something you like.

(The apostrophes are supposed to be back ticks. I am typing this on a
keyboard that doesn't appear to let me enter a back tick. Shh. It's a
Macintosh.)

On Fri, Mar 23, 2001 at 04:41:42PM -0600, Simeon Johnston wrote:
> I am trying to setup a cron job to move logfiles.  Mostly just to change
> the name.  I would like to change the name so that it ends with the date
> it was changed.  How do I do this with a bash script?  Is there a
> predifined command?
> 
> sim
> 
> _______________________________________________
> tclug-list mailing list
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list

-- 
Jim Kaufman		mailto:jmk at kaufman.eden-prairie.mn.us
home: 952-934-4851	Eden Prairie, MN 55346
fax: 952-937-9832