jigarshah
jigarshah

Reputation: 410

store unix command error message into file

I want to store error of unix command into file.

Ex. cd /test /test: No such file or directory. I want to store error "/test: No such file or directory." into file

Can you please help?

Upvotes: 0

Views: 834

Answers (1)

Frank Conry
Frank Conry

Reputation: 2718

How about

cd /test 2> myFile.txt

Upvotes: 4

Related Questions