i am compiling a source code by make command.
i want to redirect the output of make to a file but at the same time i want to see the output in terminal.
how to do this ?.
please suggest your idea.
thanks in advance.
Saravana
---------- Post updated at 05:24 PM ---------- Previous update was at 05:20 PM ----------
yeah.. i got it...
we can do like this
thanks
Last edited by Yogesh Sawant; 06-23-2009 at 02:56 AM..
Reason: added code tags
Hi all,
i type a command along with dtterm what i would like to have is that the output of the command to be shown in the new terminal .
Any Idea on how to acheive this? (0 Replies)
Hi all, I have a script which call a java program, the logging (to log file) in the program is done using log4j. However, as a safety measure, i still choose to direct standard error to another log file as follow
/usr/bin/java -classpath ${classpath} -Xmx128m TestingProgram 2>>... (1 Reply)
Hi all!!
is possible to assign the output of some command to filename, i.e.
grep_output.txt
Otherwise, I want to open a new file which name is inside another, how can I do it?
Thanks a lot! (7 Replies)
Hi,
I would like to list files: ls *.hdf
But I would like a copy of the output directed to the screen, but also APPENDED to a text file: test.txt
I have tried:
ls *.hdf | tee test.txt
However, that will just write over everything already existing in test.txt. How can I append the... (1 Reply)
Hi evreybody
In my program i work with file compressed with 7zip
I need to decompress these file
I've red the man page of p7zip which is very short (maybe too short)
Is there another program to work whit 7zip files
I need options like
redirect output (p7zip decompress file in the... (1 Reply)
Hi All,
I want to redirect only the file names to a new file from the ls -ltr directroy. how Can i do it.
my ls -ltr output will be as below.
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 event.podl
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 xyz.podl
I want my new file... (6 Replies)
HI Guys,
My requiement is to redirect output and error of sftp to a file.I have gone through few solutions given in this forum and got the alternate solution but not the one i want.
Below piece of code is not working ..
$ sftp user@server<<EOF 2>&1 >temp.txt
> cd <dir>
> ls
> EOF... (0 Replies)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
LEARN ABOUT NETBSD
daemon
DAEMON(3) BSD Library Functions Manual DAEMON(3)NAME
daemon -- run in the background
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
int
daemon(int nochdir, int noclose);
DESCRIPTION
The daemon() function is for programs wishing to detach themselves from the controlling terminal and run in the background as system daemons.
Unless the argument nochdir is non-zero, daemon() changes the current working directory to the root (/).
Unless the argument noclose is non-zero, daemon() will redirect standard input, standard output and standard error to /dev/null.
RETURN VALUES
On return 0 indicates success with -1 indicating error.
ERRORS
The function daemon() may fail and set errno for any of the errors specified for the library functions fork(2) and setsid(2).
SEE ALSO fork(2), setsid(2)HISTORY
The daemon() function first appeared in 4.4BSD.
CAVEATS
Unless the noclose argument is non-zero, daemon() will close the first three file descriptors and redirect them to /dev/null. Normally,
these correspond to standard input, standard output and standard error. However, if any of those file descriptors refer to something else
they will still be closed, resulting in incorrect behavior of the calling program. This can happen if any of standard input, standard output
or standard error have been closed before the program was run. Programs using daemon() should therefore make sure to either call daemon()
before opening any files or sockets or, alternately, verifying that any file descriptors obtained have a value greater than 2.
BUGS
daemon() uses fork() as part of its tty detachment mechanism. Consequently the process id changes when daemon() is invoked. Processes
employing daemon() can not be reliably waited upon until daemon() has been invoked.
BSD September 3, 1999 BSD