10-26-2001
>/dev/null
Maybe it's an stupid question but remeber... I'm Junior..
I use command line to run programs, and some of them gives a lot of information when, for example, you open a window or other actions. That's really bad because my terminal gets full of unwanted messages, so I use "bin file & >/dev/null" to avoid the problem.
It work's fine for almost any program but it doesn't work for others ( mozilla ). I know that maybe is because the file that I execute calls other files and are the others that send those messages to my screen.
So here is my question: How can I force a file and childs to use /dev/null as info/error output.
Thanx and sorry for my poor english. It's not my natural language..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi ,
I am importing some table from /dev/null i dont understand what is /dev/null
Sorry i am new to UNIX
sam71 (3 Replies)
Discussion started by: sam71
3 Replies
2. UNIX for Advanced & Expert Users
Hi,
Q1-What does
nroff -ms > /dev/null
Q2- What does mean -A under STAT column :
ps aux |head -20
UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 516 93,0 0,0 12 12 - A 04 nov 3906:51 wait
Thank you. (4 Replies)
Discussion started by: big123456
4 Replies
3. Shell Programming and Scripting
hello all,
In many shell scripts i found '> /dev/null' , i am not able to get this,
will any one please explain why we are using this.
thanks
sudha (2 Replies)
Discussion started by: rrs
2 Replies
4. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
5. Shell Programming and Scripting
Hi expert,
May I know what is the difference between below cron tab entry ?
0,12 * * * * /abc/myscript.sh > /dev/null 2>&1
0,12 * * * * /abc/myscript.sh (7 Replies)
Discussion started by: olaris
7 Replies
6. Shell Programming and Scripting
when do you use the path /dev/null (3 Replies)
Discussion started by: webmunkey23
3 Replies
7. UNIX for Dummies Questions & Answers
How are these two different? They both prevent output and error from being displayed. I don't see the use of the "&"
echo "hello" > /dev/null 2>&1
echo "hello" > /dev/null 2>1 (3 Replies)
Discussion started by: glev2005
3 Replies
8. Shell Programming and Scripting
I apologize if this question has been answered else where or is too elementary.
I ran across a KSH script (long unimportant story) that does this:
if ; then
CAS_SRC_LOG="/var/log/cas_src.log 2>&1"
else
CAS_SRC_LOG="/dev/null 2>&1"
fithen does this:
/usr/bin/echo "heartbeat:... (5 Replies)
Discussion started by: jbmorrisonjr
5 Replies
9. Shell Programming and Scripting
Hello All and a Happy New year to yous guys.
I'm running the below command on my AIX box and it keeps giving me the message that the file doesn't exist. I know the file don't exist, but I don't want to see the error. 2>/dev/null doesn't work.
bash-3.00$ ls -l C* | wc -l 2>/dev/null
ls:... (2 Replies)
Discussion started by: bbbngowc
2 Replies
10. Shell Programming and Scripting
Friends have the following problem
a search may not find anything which would correct example:
ls -ltr *prueba.txt | nawk '{ print $9 }' > Procesar.dat 2>/dev/null
When he finds nothing gives me the following error
ls: prueba.txt: No such file or directory
because 2> / dev / null... (4 Replies)
Discussion started by: tricampeon81
4 Replies
LEARN ABOUT ULTRIX
getttynam
getttyent(3) Library Functions Manual getttyent(3)
Name
getttyent, getttynam, setttyent, endttyent - get ttys file entry
Syntax
#include <ttyent.h>
struct ttyent *getttyent()
struct ttyent *getttynam(name) char *name;
void setttyent()
void endttyent()
Arguments
name The name of the terminal's special file in the directory.
Description
These functions allow a program to access data in the file The function reads the file line by line, opening the file if necessary.
rewinds the file, and closes it. searches from the beginning of the file until a matching name is found, or until end-of-file is encoun-
tered.
The functions and each return a pointer to an object that has the following structure. Each element of the structure contains one field of
a line in the file.
struct ttyent { /* see getttyent(3) */
char *ty_name; /* terminal device name */
char *ty_getty; /* command to execute, usually getty */
char *ty_type; /* terminal type for termcap (3x) */
int ty_status; /* status flags (see below for defines) */
char *ty_window; /* command to start up window manager */
char *ty_comment;/* usually the location of the terminal */
};
#define TTY_ON 0x1 /* enable logins (startup getty) */
#define TTY_SECURE 0x2 /* allow root to login */
#define TTY_LOCAL 0x4 /* line is local direct connect and
should ignore modem signals */
#define TTY_SHARED 0x8 /* line is shared: it can be use
for both incoming and outgoing
connections. */
#define TTY_TRACK 0x10 /* track modem status changes */
#define TTY_TERMIO 0x20 /* open line with termio defaults */
#define TTY_SU 0x40 /* disallow su to root */
extern struct ttyent *getttyent();
extern struct ttyent *getttynam();
A description of the fields follows:
ty_name
is the name of the terminal's special file in the directory
ty_getty
is the command invoked by to initialize terminal line characteristics. This command is usually but any arbitrary command can be
used. A typical use is to initiate a terminal emulator in a window system.
ty_type
is the name of the default terminal type connected to this tty line. This is typically a name from the data base. The environment
variable `TERM' is initialized with this name by
ty_status
is a mask of bit flags that indicate various actions allowed on this terminal line. The following is a description of each flag.
TTY_ON Enables logins. For instance, will start the specified command on this entry.
TTY_SECURE
Allows root to login on this terminal. TTY_ON must also be included for this to work.
TTY_LOCAL
Indicates that the line is to ignore modem signals.
TTY_SHARED
Indicates that the line can be used for both incoming and outgoing connections.
TTY_TERMIO
Indicates that a line is to be opened with default terminal attributes which are compliant with System Five termio defaults.
The line discipline will be set to be TERMIODISC.
TTY_SU Indicates that a user is allowed to su to root on this terminal. The default if this flag is not set is that a user cannot
su to root on this terminal.
ty_window
is the quoted string of a command to execute for a window system associated with the line. If no command is specified, this field
is a null string.
ty_comment
Currently unused.
Restrictions
The information returned is in a static area, so you must copy it to save it.
Return Values
A null pointer (0) is returned on an end-of-file or error.
Files
The file examined by these routines.
See Also
ttyname(3), ttys(5), init(8)
getttyent(3)