Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect error msg from "more" command?

Status
Not open for further replies.

new2unix

Programmer
Feb 5, 2001
143
US
Hi,

On the command line when issuing the following command:

more *.txt

Sometimes error msg may show up indicating certain soft-linked .txt files actually does not exist:

"file1.txt: A file or directory in the path name does not exist."

Is it possible to redirect this error output to a file so I can see exactly which soft-linked file are missing?

I tried:

more *.txt 2> missing_file.log

But that doesn't seem to work. A 0 byte missing_file.log was created without the error message ever writen to this log file.

Thanks,

Mike
 
Worked for me in Cygwin...
Sorry, no "real" *nix to try it out at this moment.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
What shell are you using?

In c-shell you have to do something bogus like

(more *.txt > /dev/tty) >& missing_file.log
Cheers,
ND [smile]

bigoldbulldog@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top