Hi, Tony
thanks for the message. but i do not want to add current time, the time stamp of the 
file is needed
cheng


-----Original Message-----
From: Anthony E. Greene [mailto:[EMAIL PROTECTED]
Sent: 13 March 2003 11:49
To: [EMAIL PROTECTED]
Subject: Re: ls --full-time


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
 
--------------------------------------------------------

 
This email is confidential and intended solely for the use of the person(s) ('the 
intended recipient') to whom it was addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the Paterson 
Institute for Cancer Research or the Christie Hospital NHS Trust. It may contain 
information that is privileged & confidential within the meaning of applicable law. 
Accordingly any dissemination, distribution, copying, or other use of this message, or 
any of its contents, by any person other than the intended recipient may constitute a 
breach of civil or criminal law and is strictly prohibited. If you are NOT the 
intended recipient please contact the sender and dispose of this e-mail as soon as 
possible.
 



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

Reply via email to