Putting error messages on the screen into a file...
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Putting error messages on the screen into a file...
Well, hopefully this will be a simple question here. It seems this morning im having a major brain fart and cant remember how to do a bunch of things.
Here is what I'm doing. Im working with samba 3.0 beta to do some preliminary testing. However, im running into a few snags when trying to mount certain things and use some of the new features...When this happens, it kicks out errors onto the screen and gives me some codes and things to check.
What i'd like to do is put these error messages into a file and keep them handy.
I've tried the tee command, for example:
samba command to mount share blah blah blah | tee > error.log
Hoping that this would kick out the errors to my log. But it's not.
So the next thing Im trying to do is somehow copy the messages off the screen and kick them to another file.
Even if I have to type the full message, how can I put it into a file without opening up a text editor...
What I mean is: Can I type the message and then somehow use cat to put it into a file?
Reason I ask is that I know, if I run a command very similiar to the one above (with -o username) I will be prompted for a password. Will that have any effect on the output of the error?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.