From: Steven Smith <sos22@cam.ac.uk>
To: linux-newbie@vger.kernel.org
Subject: Re: date alias
Date: Fri, 7 Jun 2002 09:56:29 +0100 [thread overview]
Message-ID: <20020607085629.GA296@cam.ac.uk> (raw)
In-Reply-To: <200206070311.g573BL429283@ns2.easy-pages.com>
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
> I've added the following to /root/.profile
>
> alias date='date +'%cEST''
>
> and output is Thu Jun 06 13:33:14 2002EST
I'm not quite sure what you're trying to achieve here. If
you just want the date in EST, then try:
export TZ=EST
date +%c
If you're root, you can set the system-wide timezone by
changing /etc/localtime (on my machine, this is a symbolic
link to a timezone file in /usr/share/zoneinfo). Then
anyone who doesn't have a TZ environment variable gets
that timezone.
> I have all the reference materials I need,
> but don't know where to begin looking. I'd
> like to include a space between the year
> and time zone (2002 EST).
Try:
alias date='date "+%c EST"'
> What is the %c called in the above alias?
Depending on who you ask, they're either directives or
output specifiers.
Steven Smith,
sos22@cam.ac.uk
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2002-06-07 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-07 3:25 date alias pericles
2002-06-07 8:56 ` Steven Smith [this message]
2002-06-07 10:29 ` Suriya Narayanan M S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020607085629.GA296@cam.ac.uk \
--to=sos22@cam.ac.uk \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox