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?
Leave a Reply