[Gllug] RE: [GLUG] Year, month,day?

Matthew Leach matthewl at knowledgefactory.co.za
Tue Nov 12 12:31:47 UTC 2002


Erm ... Im not exactly sure what you're asking, but I *think*
you want to get the date in that form?

You can use 'date'

	date +%Y%m%d

This will give you
20021112

HTH



­¤ -----Original Message-----
­¤ From: Neil Fryer [mailto:neil.fryer at 12snap.com] 
­¤ Sent: 12 November 2002 02:19
­¤ To: Gllug (E-mail)
­¤ Cc: Glug (E-mail)
­¤ Subject: [GLUG] Year, month,day?
­¤ 
­¤ 
­¤ Hi All
­¤ 
­¤ I have some apps that create log files in the form of 
­¤ logfile.log.20021112,
­¤ now I want to gzip these on a nightly basis, the part that 
­¤ I'm battling with
­¤ is how would I say 
­¤ 
­¤ gzip logfile.log.yyyymmdd, as there will be existing logs in 
­¤ the dir called
­¤ logfile.log, which will be live, and I don't wan't to zip that?
­¤ 
­¤ Thanks
­¤ 
­¤ Neil Fryer
­¤ Systems Administrator
­¤ 12Snap UK Ltd
­¤ Tel:  +44(0)20 7534 7322
­¤ Fax: +44(0)20 7534 7301
­¤ Mobile: +44(0)7855 400 309
­¤ E-mail: neil.fryer at 12snap.com
­¤ http://www.12snap.com
­¤ 
­¤ 
­¤ ----
­¤ To unsubscribe from this list: send the line "unsubscribe glug" in
­¤ the subject of a message to glug-request at linux.org.za. If you have a
­¤ problem unsubscribing, please mail glug-admins at linux.org.za
­¤ 
­¤ 
­¤ 

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list