我有以下命令来获取文件日期和时间
adb shell ls -l /sdcard/sample.txt
Result of this command :
-rwxrwxr-x system sdcard_rw 676 2013-09-24 11:23 sample.txt
Run Code Online (Sandbox Code Playgroud)
现在,我也希望2013年9月24日11:23的时间也要秒。像2013-09-24 11:23:11
我将如何获取文件修改日期(包括秒)。
谢谢.. :)
如果您有stat命令:
stat -c %y /sdcard/sample.txt
Run Code Online (Sandbox Code Playgroud)
自大纪元以来的秒数
stat -c %Y /sdcard/sample.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4146 次 |
| 最近记录: |