Need help in changing Mod time of a file

I have a file called MasterRECEIVEFranScript. I need to change its modified time to Sep 20 09:34 2008

For this i have tried a command ,but no success

touch -m -t 1222079885 MasterRECEIVEFranScript

-------------------------------------------------------------

Plz help me in this ?

it's giving me time as Oct 11 2013

$ ls -lrt shell2.ksh
-rw-rw-r--   1 ppattusa pcfd          71 Jun 10 00:00 shell2.ksh

$ touch -m -t 200809200934 shell2.ksh

$ ls -lrt shell2.ksh
-rw-rw-r--   1 ppattusa pcfd          71 Sep 20 09:34 shell2.ksh

Its working for me. Wat the error you getting...?

The time stamp you are issuing in the -t option looks funky. Try with the format suggested by Palsevlohit_123's example.

Might be better to post a followup rather than edit your original submission, as it's not obvious what you have changed, and/or whether you are responding to the questions asked in followups.

look 1222079885 is the epoch time which corresponds to Sep 20 09:34

if you use command
perl -le 'print scalar localtime(1222079885);'

It's giving the below ouptput
Mon Sep 22 05:38:05 2008

But when i m using this with the below command it's gives me time as Oct 11 2013

touch -m -t 1222079885 MasterRECEIVEFranScript

Touch accepts the -t argument in the form [[CC]YY]MMDDhhmm[.SS], not the epoch time. Read of the manpage of touch!

Thanks a lot evrybody i got it using

touch -m -t 200809200934

command.

I was just wondering can we do it through EPOCH time.

Thanks a lot everybody

You can easily convert epoch to human-readable and/or the format expected by touch -t with Perl.

touch -m -t $(perl -e '@l=localtime(shift);
  printf "%02i" x 5 . "\n", $l[5]+1900, @l[4,3,2,1]' 1222079885) shell2.ksh

If your shell is very old, you'll need to use `...` instead of $(...), with grave accents / backticks (ASCII 96; not regular straight quotes!) around the Perl command.