Computing.Net > Forums > Unix > renaming a file based on systm date

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

renaming a file based on systm date

Reply to Message Icon

Name: Tony
Date: April 17, 2003 at 21:48:56 Pacific
OS: RH 7.2
CPU/Ram: ?
Comment:

Hello,
What would the command be to rename a file based on system date?
Thanks in Advance!
Tony




Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: April 18, 2003 at 09:25:07 Pacific
Reply:

Tony:

A way:

mv filename f.`date +"%m%d%y%H%M%S"`

or if you're running ksh

mv filename f.$(date +"%m%d%y%H%M%S")

Regards,

nails


0

Response Number 2
Name: Tony
Date: May 7, 2003 at 09:11:09 Pacific
Reply:

Thanks.....I'll give it a try!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: renaming a file based on systm date

How to rename a file based 1st line www.computing.net/answers/unix/how-to-rename-a-file-based-1st-line/8125.html

renaming files based on date arguments www.computing.net/answers/unix/renaming-files-based-on-date-arguments/2499.html

script to change file names www.computing.net/answers/unix/script-to-change-file-names/8327.html