Git Product home page Git Product logo

Comments (3)

g23guy avatar g23guy commented on July 20, 2024

By default ls -l does show the modification time stamp. We could use -c or -u, but is that what you are really looking for? For example:

sles15sp3:~ # ls -l --time-style=long-iso /sbin/vgs
lrwxrwxrwx 1 root root 13 2021-06-09 08:45 /sbin/vgs -> /usr/sbin/vgs
sles15sp3:~ # ls -lu --time-style=long-iso /sbin/vgs
lrwxrwxrwx 1 root root 13 2021-07-28 07:23 /sbin/vgs -> /usr/sbin/vgs
sles15sp3:~ # ls -lc --time-style=long-iso /sbin/vgs
lrwxrwxrwx 1 root root 13 2021-07-22 12:12 /sbin/vgs -> /usr/sbin/vgs
sles15sp3:~ # stat /sbin/vgs
File: /sbin/vgs -> /usr/sbin/vgs
Size: 13 Blocks: 8 IO Block: 4096 symbolic link
Device: 2fh/47d Inode: 89564 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-07-28 07:23:47.274770895 -0600
Modify: 2021-06-09 08:45:31.000000000 -0600
Change: 2021-07-22 12:12:18.242853563 -0600
Birth: 2021-07-22 12:12:18.242853563 -0600

ls -l correctly shows /sbin/vgs has not been modified since 6/9/21.

from supportutils.

jirib avatar jirib commented on July 20, 2024

My use case was to see when customer did a change in a config file. An example:

grep '/etc/lvm/lvm.conf$' lvm.txt 
S.5....T.  c /etc/lvm/lvm.conf
# /etc/lvm/lvm.conf

I can see only it was modified but can I know when?

from supportutils.

g23guy avatar g23guy commented on July 20, 2024

The existing supportconfig ls commands show the modification time by default. So running ls -l /etc/lvm/ will show the modification time.
sles15sp3:/var/log/samba # ls -l /etc/lvm/lvm.conf
-rw-r--r-- 1 root root 98247 Aug 4 13:32 /etc/lvm/lvm.conf

from supportutils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.