Re: ls -l
On 12Apr2007 14:52, y.nikhileshwar <y.nikhileshwar@...> wrote:
| if i execute the ls -l command i will get timings in 24:00 format
| > i dont want like that i just want in a.m and p.m format
| plz send the answer in a clear manner,so that i can understand
Godwin's rather opaque response meant that this behaviour is controlled
by the "locale" settings on your computer, which describe language and
related features. Many commands vary their output based on these
The command "man locale" describes the "locale" command, which reports
your settings. Running it for me says:
The command "man 7 locale" describes the available shell environment
variables that affect this. Personally, I only set two of these variables:
% env|grep ^LC|sort
which makes most commands sort output the way I historically expect it.
You can experiment with various things with "ls" like this:
% LC_TIME=... ls -l some-filename
replacing "..." with various valid values. See "man 5 locale" for
more detailed information on these values.
Finally, "man ls" describes the workings of the "ls" command.
If you have a GNU system (eg Linux) then there will be a --time-style
with -l, show times using style STYLE: full-iso, long-iso,
iso, locale, +FORMAT. FORMAT is interpreted like `date'; if
FORMAT is FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent
files and FORMAT2 to recent files; if STYLE is prefixed with
`posix-', STYLE takes effect only outside the POSIX locale
See "man date" for what you can use for the "FORMAT" string.
Finally, on many Linux systems the command "man 1p ls" will describe the
POSIX definition for the "ls" command. The information here should apply
to almost all UNIX systems, whereas plain "man ls" will give you
particular system's "ls" command, which should be a superset of "man 1p
Cameron Simpson <cs@...> DoD#743
Everything that can be invented has been invented.
- Charles H. Duell, Commissioner, U.S. Office of Patents, 1899.
- -----BEGIN PGP SIGNED MESSAGE-----
On Fri, 13 Apr 2007 09:56:41 +1000, Cameron Simpson <cs@...>
> Godwin's rather opaque response meant that this behaviour isIt was opaque for a reason.
> controlled by the "locale" settings on your computer,
If the OP has everything served up on a silver platter like you just
did, s/he won't remember it nearly as well as had s/he had to search
for the answers hirself.
People, you're not supposed to expect everyone to do your legwork for
G. Stewart - gstewart@...
The day Microsoft makes something that doesn't blow up will be the day
they start making inflatable dolls.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-----END PGP SIGNATURE-----
On 13Apr2007 08:42, Godwin Stewart <gstewart@...> wrote:
| On Fri, 13 Apr 2007 09:56:41 +1000, Cameron Simpson <cs@...>
| > Godwin's rather opaque response meant that this behaviour is
| > controlled by the "locale" settings on your computer,
| It was opaque for a reason.
| If the OP has everything served up on a silver platter like you just
| did, s/he won't remember it nearly as well as had s/he had to search
| for the answers hirself.
On my system there are about 6 or 7 "locale" manual entries; the normal man
command does a good job of concealing that. I told him where to find it, what
it was for. And not exactly what to use; he can figure that out.
| People, you're not supposed to expect everyone to do your legwork for
The net is vast. It helps to tell people where to look, not just a
I don't mind doing some explaination. You answer was opaque to the point
of unhelpfulness, in my opinion.
Cameron Simpson <cs@...> DoD#743
You can blip it twice to clear the bore,
But blip it thrice, and you've sinned once more.
- Tom Warner <tom@...>