macos - issues "using ls -al --full-time" in OSX

ID : 274354

viewed : 35

Tags : macosbashlsmacos

Top 3 Answer for macos - issues "using ls -al --full-time" in OSX

vote vote


for native ls command, option -T seems to be the alternative of --full-time, and it expands to seconds, example as below:

>$  ls -lT -rw-r--r--   1 raison staff     197 Feb 14 09:12:56 2013 1.c -rw-r--r--   1 raison staff    1174 Mar  8 09:34:49 2013 1.s -rw-r--r--   1 raison staff     993 Feb  5 14:44:09 2013 1.x86.s 
vote vote


The BSD (Mac OS X) version of ls (installed as /usr/bin/ls) does not support the --full-time option.

The GNU version of ls does support --full-time. I have the GNU ls installed in a different directory (/usr/gnu/bin/ls).

  • Are you sure that you have GNU ls on your machine at all?
  • If so, are you sure your PATH includes the directory where it is installed ahead of /usr/bin when you run scripts?
vote vote


$ uname -rs Darwin 11.4.2 $ ls -al --full-time ls: illegal option -- - usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...] 

Are you sure your ls isn't actually gls installed by homebrew?

Top 3 video Explaining macos - issues "using ls -al --full-time" in OSX