LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-15-2008, 01:18 AM   #1
jkeertir
Member
 
Registered: Mar 2008
Posts: 75

Rep: Reputation: 15
echo supressing


Dear all,

I am getting error while mounting .it is showing error on the terminal.I want to direct the error message to the file and want that the error message sholud not be displayed on the terminal.
Is there any way to do this?

Thanks in advance.
With regards,
Keerti
 
Old 04-15-2008, 01:33 AM   #2
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
# mount -whatever- > /some/file.text

Last edited by Maligree; 04-15-2008 at 01:34 AM.
 
Old 04-15-2008, 07:30 AM   #3
tiocsti
LQ Newbie
 
Registered: Apr 2008
Location: Atlanta, GA
Distribution: [linux] Ubuntu, [bsd] FreeBSD, NetBSD
Posts: 21

Rep: Reputation: 15
Quote:
Originally Posted by jkeertir View Post
Dear all,

I am getting error while mounting .it is showing error on the terminal.I want to direct the error message to the file and want that the error message sholud not be displayed on the terminal.
Is there any way to do this?
You didn't say which shell you used, but in borne type shells, generally something like > for standard output, and 2> for standard error would work. So program 2> log should work, since error messages tend to be displayed on stderr. In a borne type shell, you can do program > log 2>&1 as well, which logs both stdout and stderr to the same file.

If you ever want to both log and display, you can look at the tee(1) program too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ls | echo, I got blank, why can't echo take the 2nd seat in a pipeline? elinuxqs Linux - Newbie 6 11-24-2006 08:25 AM
BASH: How to NOT echo to screen with "if echo $x | grep ".*"; then" eur0dad Programming 9 07-27-2006 02:14 PM
Supressing Fields w/ AWK Rv5 Programming 3 10-19-2004 11:06 AM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 02:59 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration