SHELL Script Example: Get File Last Modified Time
SHELL Script Example: how to get last modification time of a file in unix shell?
Logon to command prompt then copy & past the bellow code to get the desired result:
ls -ltr sys_monitoring.sh | awk '{print $8}' | awk -F':' '{print $2}'
Here "sys_monitoring.sh" is the file & we want to get it's last modification time. If everything went well you should get some interesting result as follows:
SHELL Script Example: Get File Last Modified Time - output in the unix shell command prompt
Related Tutorial Examples
- AWK SHELL Script File Last Modification Information Changing Delimiter
- File Last Modification Information in SHELL Script
- Arithmetic Operations in SHELL Script Example
- UNIX Command Example: kill - Kill Stops a Process
- UNIX Command Example: ps - Display Process List Information
- UNIX Command Example: jobs - Display Current Shell Information
- UNIX Command Example: file - Display File Type Extension Information
- 28 Tutorials to Learn Oracle
- 20 Steps to Make CakePHP Blog Project
- 19 Examples to Learn MySQL
No comments:
Post a Comment
leave your comments here..