Azure / azure-diskinspect-service

Inspect Azure IaaS Disks for Windows and Linux
MIT License
30 stars 55 forks source link

Support Better Resolution on File Time Stamps #30

Closed boumenot closed 2 years ago

boumenot commented 6 years ago

Right now, the output of ll is the following.

-rw-rw-r--   1 me me 27009 Mar  2 00:36 manifest_by_file.md
-rw-rw-r--   1 me me 66535 Mar  2 00:36 manifest_content.md

The timestamp has minute resolution, which isn't good enough to determine when a file was created. There is a way to get better resolution on UNIX using ls -al --time-style=full-iso. Is it possible to do for azure-diskinspect-service.

-rw-rw-r--   1 me me 27009 2018-03-02 00:36:25.519793900 +0000 manifest_by_file.md
-rw-rw-r--   1 me me 66535 2018-03-02 00:36:35.955793900 +0000 manifest_content.md

I don't see an exact implementation in libguestfs, but guestfs_lstatnslist this may be a good start.

amitchat commented 6 years ago

Interesting to note that virt-ls actually lets you provide the ls parameters. Perhaps we need investigate if we can call into virt-ls instead of guestfish's ll to get the more advanced information.