1

I am having confusion in touch command while i execute "touch -m 0303 10 30 filename" it should actually update the modification time to 03 - march 03 - date 10 hours 30 - min But while executing it is creating 5 empty files named 03 03 10 30 filename I executed this command in OSX

1
  • 1
    You are not familiar with man? Commented Nov 29, 2015 at 14:28

2 Answers 2

1

Try this command line, Instead of taking the current time-stamp, you can explicitly specify the time using -t flag.

The format for specifying -t is [[CC]YY]MMDDhhmm[.SS]

touch -m -t 03041030 filename
Sign up to request clarification or add additional context in comments.

Comments

1

Read man touch again. -m doesn't take any arguments, you have to add -t or -d (I'm not sure whether both options are available on OSX).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.