`stat` command format not the same in DQ interface as on personal system or Jupyter Notebook

I’m working on the Elements of the Command Line, Users and Permissions lesson, and I’ve noticed that the format of the output from the stat command is different on the Dataquest platform compared to the output from my computer. In particular, the headers like Device: and Access: are present in the DQ platform output but missing from my devices output.

The DQ platform:

/home/dq$ stat Trash
  File: ‘Trash’                                                                 
  Size: 4096            Blocks: 8          IO Block: 4096   d                   
irectory                                                                        
Device: 1000057h/16777303d      Inode: 4360056     Links: 2                     
Access: (0776/drwxrwxrw-)  Uid: ( 1000/      dq)   Gid: ( 100                   
0/      dq)                                                                     
Access: 2020-07-29 19:15:27.735053931 +0000                                     
Modify: 2020-07-29 19:15:27.735053931 +0000                                     
Change: 2020-07-29 23:40:45.525809334 +0000                                     
 Birth: -

My machine:

stat Trash
16777221 55854211 drwx---r-- 2 user_name group_name 0 64 "Jul 29 16:32:49 2020" "Jul 29 19:07:54 2020" "Jul 29 16:18:37 2020" "Jul 29 12:14:01 2020" 4096 0 0 Trash
2 Likes

Hi @quinones,

Seems like you ran that command in macOS. The stat command in macOS is slightly different from the one in Linux.

If you want to see more information, then you have to use -x option like this:
stat -x Trash

Best,
Sahil

1 Like