How Do I Grep a Timestamp in Unix?
Contents How Do I Grep a Timestamp? I Suggest You Do: Press Ctrl + Alt + T. Run the Command ( -E for Extended Regex): Sudo Grep -E ‘2019-03-19T09:3[6-9]’ How...
Contents
How do I grep a timestamp?
I suggest you do:
- Press CTRL + ALT + T .
- Run the command ( -E for extended regex): sudo grep -E ‘2019-03-19T09:3[6-9]’ <file or file_path>
Must Read
How do you find the timestamp of a file in Unix?
The command is called stat . If you want to adjust the format, refer to the man pages, since the output is OS-specific and varies under Linux/Unix. Generally, you can get the times through a normal directory listing as well: ls -l outputs last time the file content was modified, the mtime.