Listing Full Timestamps with ls in Linux

ls --full-time ls –full-time

I was reading a man page for ls command and noticed a very interesting command line option. It appears that full-time option is available in Linux, but not in MacOS. Need to check later to confirm if it’s a Linux-only or filesystem specific option.

Default ls -al Behavior

Here’s how a typical long form of ls looks:

greys@s2:~/scripts $ ls -al
 total 40
 drwxr-xr-x  4 root  root  4096 Apr 25  2018 .
 drwx------. 9 greys greys 4096 Jul 26 01:09 ..
 -rwxr-xr-x  1 root  root  1344 Apr 25  2018 backup.sh
 -rwxr-xr-x  1 root  root   762 Apr 25  2018 content_jira.sh
 -rwxr-xr-x  1 root  root  1125 Apr 25  2018 copy_content_guest.sh
 drwxr-xr-x  8 root  root  4096 Apr 25  2018 .git
 drwxr-xr-x  2 root  root  4096 Apr 25  2018 lists
 -rw-r--r--  1 root  root   340 Apr 25  2018 README.md
 -rw-r--r--  1 root  root  1732 Apr 25  2018 scanning_ports.sh
 -rwxr-xr-x  1 root  root  1413 Apr 25  2018 server-info.sh

Listing full timestamps

And this is the full timestamps:

greys@s2:~/scripts $ ls --full-time
 total 28
 -rwxr-xr-x 1 root root 1344 2018-04-25 13:10:21.379844332 +0100 backup.sh
 -rwxr-xr-x 1 root root  762 2018-04-25 13:10:21.379844332 +0100 content_jira.sh
 -rwxr-xr-x 1 root root 1125 2018-04-25 13:44:04.054711619 +0100 copy_content_guest.sh
 drwxr-xr-x 2 root root 4096 2018-04-25 13:31:56.514054659 +0100 lists
 -rw-r--r-- 1 root root  340 2018-04-25 13:10:21.379844332 +0100 README.md
 -rw-r--r-- 1 root root 1732 2018-04-25 13:10:21.379844332 +0100 scanning_ports.sh
 -rwxr-xr-x 1 root root 1413 2018-04-25 13:10:21.379844332 +0100 server-info.sh

Seems pretty cool, right?

See Also




Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets