Score:0

ls command that shows AM/PM

in flag

I'm using a CentOS 7 OS, configured based on AM/PM. Is there a linux command line (like ls --full-time) that shows full time information including AM/PM?

Below example does not show AM/PM:

# ls --full-time
# -rw-------. 1 root root 125274133976 2021-06-10 05:43:58.348897593 -0700 file1.tar.gz
# -rw-------. 1 root root 187085036220 2021-06-10 08:28:56.257324419 -0700 file2.tar.gz
Doug Deden avatar
pk flag
Have you tried using `--time-style` with a format string including `%p`?
Score:1
in flag

Thanks to Doug Deden's hint, I was able to figure out the ls command line. Below is the ls command that delivers exactly the results I needed:

# ls -h  -l --time-style="+%F %r"
# total 285G
# -rw-------. 1 root root 110G 2021-06-11 06:38:57 AM file1.tar.gz
# -rw-------. 1 root root 175G 2021-06-11 04:37:54 PM file2.tar.gz
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.