简体   繁体   English

查找文件linux的修改时间和修改后的用户名

[英]find the modification time and modifed user name of a file linux

I am using Linux Environment and read-write permission was provided to a file. 我正在使用Linux Env​​ironment,并且提供了对文件的读写许可。 Is there any command to find the modification time and the user who modified the file in linux command. 是否有任何命令可以找到修改时间以及在linux命令中修改文件的用户。 Read write permission was provided to a 已向

stat <filename>

will display the access and modification time of the file not the one who modified the file. 将显示文件的访问和修改时间,而不是修改文件的时间。

Linux and POSIX filesystems don't keep the metadata information about who modified last an existing file. Linux和POSIX文件系统不保留有关谁最后修改了一个现有文件的元数据信息。

A file does have an owner id, often the user id of the process which created that file. 文件确实具有所有者ID,通常是创建该文件的进程的用户ID。

If the file is some kind of source code, you'll better put it under some version control system (VCS); 如果文件是某种源代码,则最好将其置于某种版本控制系统(VCS)下; I recommend git . 我推荐git Then the VCS is managing such metadata so is keeping the information about who committed last that file. 然后,VCS将管理此类元数据,从而保留有关谁最后提交了该文件的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM