What Is the command to change a file's creation time. means
one file is created at the time 15:19 then time should br
changed to 14:14
Answers were Sorted based on User's Feedback
Answer / deepti shrivastava
touch :- used to change the time stamps
Syntax :- touch options expression filename(s)
where expression consists of eight digit number
using the format MMDDhhmm(month,day,hr & min)
E.g :- $ touch 03091245 emp.lst ; ls -l emp.lst
-rw-r--r-- 1 kumar metal 870 Mar 09 12:45 emp.lst
The -m & -a options chng the modifications & access times.
$ touch -m 02281030 emp.lst ; ls -l emp.lst
-rw-r--r-- 1 kumar metal 870 Feb 28 10:30 emp.lst
| Is This Answer Correct ? | 42 Yes | 3 No |
Answer / ashok shah
For linux user, use the following command.
$touch -t yyyymmddhhmm.ss filename
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / sudhir
The folwing command used for the above question
touch -m -a -t 08271113 abc.txt
here the format which we nee to specify is as below.
08271113
mmddhhmi
Regards,
Sudhir
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / atul khachane
Yes. Touch command update the access and modification times of each FILE to the current time.
-d, --date=STRING
parse STRING and use it instead of current time
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
-d and -t options accept different time-date formats.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / phil
All of the above are wrong. 'touch' can only change the
creation time to the current time. touch -t [date] does not
change creation time.
| Is This Answer Correct ? | 1 Yes | 4 No |
How do I use grep to search for a file?
Which command is used to copy files?
distinguish between multi-tasking,multi-user,multi- processing and time sharing?
7 Answers Alcatel, Cisco, Infosys, University Exams,
what is the difference between Touch & cat command
Is command prompt unix?
How to install scsi driver in unix? give me explanation clearly?
How does a user get the current date, time in UNIX?
what is the functionality of kernel in unix architecture?
What are bash commands?
how unix kernel distinguishes between a normal file and device file ?
7 Answers Google, IBM, McAfee, Vodafone,
How do I use nslookup?
can we use cat command as an editor ..???