Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


10.3.24 getFileMTime (gets date and time of file and directory)

Syntax

getFileMTime  [-d] [-t]  path-name

Description

This command outputs the modification date and modification time of the file or directory specified for argument. Modification date is output in the format yyyy/mm/dd. Modification time is output in the format hh:mm:ss.

Arguments

-d

This command outputs the update date.

-t

This command outputs the update time.

If any of the aforementioned options is not specified or both of the aforementioned options are specified, modification time and modification time are output with one line by using the space delimiter.

path-name

This option specifies the path name of the file or directory from which update date and update time are obtained.

Output to the standard output

This command outputs the modification date and modification time of the file or directory.

Return codes

Return code

Meaning

0

Normal termination

Not less than 1

Termination with an error

Examples

getFileMTime log.txt      # "2015/04/23 09:20:50" is output.
getFileMTime -d log.txt   # "2015/04/23" is output.
getFileMTime -t log.txt   # "09:20:50" is output.