Make a zip file with date/time created as the name? [solved]

  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1615

Post 3+ Months Ago

How do I modify:

/dir1/dir2/dir3 . zip -R foo.zip *.txt

to create a file with today's date and time, something like

20060910_120359.zip ?

I am using HP-UX, and I do not have the command utime on my system.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • PsyckBoy
  • Graduate
  • Graduate
  • PsyckBoy
  • Posts: 204
  • Loc: SoCal

Post 3+ Months Ago

This might work if the "date" command is the same on HP-UX as it is on Linux.

zip -R `date +%Y%m%d_%H%M%S`.zip *.txt
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1615

Post 3+ Months Ago

Awesome. Thanks PsyckBoy (and Ozzu!)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 22 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.