<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can &amp;quot;date&amp;quot; be changed system wide? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105077#M689155</link>
    <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;Suggest to your user that (s)he create an alias for 'date' in the '.profile'.  Something like:&lt;BR /&gt;&lt;BR /&gt;# alias date='date "+%Y/%m/%d"'&lt;BR /&gt;&lt;BR /&gt;As for changing the format of the date in 'ls' there are several ways to do this, including the method below (from the ITRC a long time ago):&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# cat llsec&lt;BR /&gt;# This script checks if a /var/tmp/ls.cat message catalog exists,&lt;BR /&gt;# and if not, creates one where the display formats of ls(1) are&lt;BR /&gt;# changed to always display time in "%b %2d %H:%M:%S %Y" format,&lt;BR /&gt;# like&lt;BR /&gt;#      "May 23 13:43:56 2002"&lt;BR /&gt;#&lt;BR /&gt;# It then proceeds to run ll(1) using this modified message catalog.&lt;BR /&gt;# Note that if root should run this, a secure locations should be&lt;BR /&gt;# used instead of /var/tmp.&lt;BR /&gt;# Usage: &amp;lt;script-name&amp;gt; &lt;LL&gt;&lt;BR /&gt;&lt;BR /&gt;# e.g.: ./llsec /etc/passwd&lt;BR /&gt;&lt;BR /&gt;if [ ! -s /var/tmp/ls.cat ]; then&lt;BR /&gt;   echo Creating /var/tmp/ls.cat &amp;gt;&amp;amp;2&lt;BR /&gt;   dumpmsg /usr/lib/nls/msg/C/ls.cat |&lt;BR /&gt;   sed -e "s/%b %2d.*$/%b %2d %H:%M:%S %Y/" |&lt;BR /&gt;   gencat /var/tmp/ls.cat -&lt;BR /&gt;fi&lt;BR /&gt;export NLSPATH="/var/tmp/%N.cat"&lt;BR /&gt;exec ll "$@"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/LL&gt;</description>
    <pubDate>Wed, 23 Apr 2008 14:06:41 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2008-04-23T14:06:41Z</dc:date>
    <item>
      <title>Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105076#M689154</link>
      <description>I have a user who is hoping to setup up his profile so that the date shows up in another format that what is HP-UX(11.23) standard.  So he wants to type "date" and it will show up say 2008/04/23 or something to that effect anyway.  Same as when he does an "ls" he will see the date of files with that format of date as well.  I do not believe it can be done, but figured I would check here before answering him.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 23 Apr 2008 13:30:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105076#M689154</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2008-04-23T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105077#M689155</link>
      <description>&lt;!--!*#--&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;Suggest to your user that (s)he create an alias for 'date' in the '.profile'.  Something like:&lt;BR /&gt;&lt;BR /&gt;# alias date='date "+%Y/%m/%d"'&lt;BR /&gt;&lt;BR /&gt;As for changing the format of the date in 'ls' there are several ways to do this, including the method below (from the ITRC a long time ago):&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# cat llsec&lt;BR /&gt;# This script checks if a /var/tmp/ls.cat message catalog exists,&lt;BR /&gt;# and if not, creates one where the display formats of ls(1) are&lt;BR /&gt;# changed to always display time in "%b %2d %H:%M:%S %Y" format,&lt;BR /&gt;# like&lt;BR /&gt;#      "May 23 13:43:56 2002"&lt;BR /&gt;#&lt;BR /&gt;# It then proceeds to run ll(1) using this modified message catalog.&lt;BR /&gt;# Note that if root should run this, a secure locations should be&lt;BR /&gt;# used instead of /var/tmp.&lt;BR /&gt;# Usage: &amp;lt;script-name&amp;gt; &lt;LL&gt;&lt;BR /&gt;&lt;BR /&gt;# e.g.: ./llsec /etc/passwd&lt;BR /&gt;&lt;BR /&gt;if [ ! -s /var/tmp/ls.cat ]; then&lt;BR /&gt;   echo Creating /var/tmp/ls.cat &amp;gt;&amp;amp;2&lt;BR /&gt;   dumpmsg /usr/lib/nls/msg/C/ls.cat |&lt;BR /&gt;   sed -e "s/%b %2d.*$/%b %2d %H:%M:%S %Y/" |&lt;BR /&gt;   gencat /var/tmp/ls.cat -&lt;BR /&gt;fi&lt;BR /&gt;export NLSPATH="/var/tmp/%N.cat"&lt;BR /&gt;exec ll "$@"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/LL&gt;</description>
      <pubDate>Wed, 23 Apr 2008 14:06:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105077#M689155</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-23T14:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105078#M689156</link>
      <description>Set up an alias for him that formats the date the way he wants.&lt;BR /&gt;&lt;BR /&gt;alias date="date +'%-4.4h %2.1d %H:%M'"&lt;BR /&gt;&lt;BR /&gt;or whatever format he wants.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 23 Apr 2008 14:07:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105078#M689156</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-04-23T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105079#M689157</link>
      <description>That would work for when he types date....thanks.  But he is also looking for any unix command that outputs anything with dates in it (ie: ls) to be in the same format.</description>
      <pubDate>Wed, 23 Apr 2008 14:08:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105079#M689157</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2008-04-23T14:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105080#M689158</link>
      <description>Well James gave you a script that would change the format shown by ls.  You could set up another alias for him so ls would invoke that script.  Any other commands that output a date could be handled in a similar fashion.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 23 Apr 2008 14:16:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105080#M689158</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-04-23T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105081#M689159</link>
      <description>Sounds like your user is looking for locale settings, specifically LC_TIME.&lt;BR /&gt;&lt;BR /&gt;See "man locale" for more information.&lt;BR /&gt;Use "locale -a" to get a listing of available locale settings.&lt;BR /&gt;You can test with a command like "LC_TIME=fi_FI.utf8 date" or "LC_TIME=fi_FI.utf8 ll" to see the effects. &lt;BR /&gt;This environment variable will change the default time representation in all programs that use the strftime() function, i.e. almost everywhere.&lt;BR /&gt;&lt;BR /&gt;When (or if) you'll find a suitable setting, you can make it permanent by setting &amp;amp; exporting the variable in the user's .profile.  &lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 23 Apr 2008 16:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105081#M689159</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2008-04-23T16:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105082#M689160</link>
      <description>&lt;!--!*#--&gt;After thinking a bit further, I experimented with a small script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;locale -a | while read foo&lt;BR /&gt;do&lt;BR /&gt;  echo -ne "$foo: \t"&lt;BR /&gt;  LC_TIME=$foo date&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;(Warning: this will produce some strange characters that might confuse some terminals/terminal emulators.)&lt;BR /&gt;&lt;BR /&gt;Apparently the HP-UX standard locales won't offer what the user is asking. If the user insists, you might be able to create your own locale definition file. See "man 1m localedef" and "man 4 localedef" if you wish to try this.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 23 Apr 2008 16:32:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105082#M689160</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2008-04-23T16:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can "date" be changed system wide?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105083#M689161</link>
      <description>Thanks</description>
      <pubDate>Wed, 23 Apr 2008 16:38:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-quot-date-quot-be-changed-system-wide/m-p/5105083#M689161</guid>
      <dc:creator>dev44</dc:creator>
      <dc:date>2008-04-23T16:38:06Z</dc:date>
    </item>
  </channel>
</rss>

