[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
If you want the date in a nice long format you might try this...
tar -cvjpf $(date "+%m%d%y %H%M%S").tar.bz2 stuff to compress
^ for tar.bz2
That will vomit out monthdayyearhoursminutesseconds in an ugly format
You can begin to format it like this: $(date "+%m\\%d\\%y%H%M%S")
which will give you 02/26/0611570...
It's not a big problem, until you do time, because american time is
usually displayed with colons. The problem with that is, unix gets
really freaked out if you try to use a colon in a filename. So, it's
pretty much a matter of finding something else.
Periods for example...
$(date "+%m\\%d\\%y_%H.%M.%S") spits out 02/26/06_12.00.22
And that doesn't confuse the computer like 02/26/06_12:00:22 would.
I'm not sure you to make a space... but I'm sure someone else can
help with that.
I'm sure there's a way to display long [ written out ] dates too...
but again, I have no idea.
If I were you, I'd read the date man page.
$ man date
On Mac OS it doesn't have much about formatting, but on your Linux
distro it might.
[ hmm.. $ man woman if only... ]
Hope this helps. Have fun.
To unsubscribe, send email to email@example.com with
"unsubscribe silug-discuss" in the body.
- From: hbrhodes <firstname.lastname@example.org>
- Re: bashing
- From: Casey Boone <email@example.com>