Operating System - HP-UX
1832106 Members
3138 Online
110038 Solutions
New Discussion

Re: how to change a file's mtime

 
SOLVED
Go to solution
shaocheng
Occasional Contributor

how to change a file's mtime

how to change a file's mtime
5 REPLIES 5
Steve Steel
Honored Contributor

Re: how to change a file's mtime

Hi


NAME
touch - update access, modification, and/or change times of file

SYNOPSIS
touch [-amc] [-r ref_file | -t time] file_name ...


Read man touch


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steven Sim Kok Leong
Honored Contributor

Re: how to change a file's mtime

Hi,

You just need a little touch.

Sorry, can't help it :)

Steven Sim Kok Leong
BFA6
Respected Contributor

Re: how to change a file's mtime

Hi,

Use touch. Check the man page for the syntax.

Hilary
Ravi_8
Honored Contributor

Re: how to change a file's mtime

hi,

#touch file_name will change the file mtime to the present time
never give up
Vincenzo Restuccia
Honored Contributor
Solution

Re: how to change a file's mtime

The following command sets the modification and access times of the
file named "bastille" to midnight, July 14, 1989, creating the file if
it does not already exist.

touch -t 8907140000 name_file