On 13-Mar-2003/09:08 +0000, Zhi Cheng Wang <[EMAIL PROTECTED]> wrote:
> 
>now i want to backup files by renaming them with their time stamp added
>the end of file name. by using "ls --full-time", however, different
>version of RH gives different format, which make my scripts not
>universally applicable. is there a better way to get the same time stamp
>format, or to test which version of Linux (not kernel) is running?

currdate=`date +%Y-%m-%d`
newfilename=backup.$currdate

There are many options for the format of the date. See the 'date' man
page.


Tony
-- 
Anthony E. Greene <mailto:[EMAIL PROTECTED]>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.pobox.com/~agreene/>
Linux. The choice of a GNU generation <http://www.linux.org/>



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to