01-28-2008
Terminal Output to a File ??
Hey,
How can I transfer the terminal output to a file ?
For example :
command "fuser" returns the "process-id" and prints the output on the terminal, but I want that output to a file as well. How can I do that ?
/clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor $ fuser -uf /clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor
OUTPUT ON TERMINAL :
/clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor: 1327500c(mqsiadm)
And I want this output to a file.
In general, the commands that gives output to the terminal or returns somthing, how can we get those to the file ?
I know about the 1> and 2> redirections.
What I am talking about, is redirection the output from Terminal to a File.
Can anyone help me !!
Thanks in advance !
Varun.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all
The makefile of a large project produces hundreds of lines of output, which I can't look at any more when the build is finished. If I simply redirect the output to a file, I can't see the progress of the building process...
Is there a possibility to redirect the output to a file and at... (1 Reply)
Discussion started by: Charlie
1 Replies
2. Programming
How can I write to another user's pseudo tty, but not to its current prompt position (as in open("/dev/pts007", ...) followed by write() ). Instead I would like to write to the top center of the screen using color red, for example. Like curses, but from another console. (6 Replies)
Discussion started by: andreis
6 Replies
3. Solaris
I have a window open on my ultra 10 - a terminal window connecting to a server.
Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
Discussion started by: frustrated1
2 Replies
4. Solaris
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)
Discussion started by: Sayantan
0 Replies
5. UNIX Desktop Questions & Answers
I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting.
I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a... (4 Replies)
Discussion started by: tdelliott
4 Replies
6. Shell Programming and Scripting
Hello
Using BASH under Ubuntu 10.4 lts + XMonad
My script is almost perfect but i'm stuck at the last hurdle:
I need a sort of modified 'echo' which truncates its output to the width of the terminal
I can find the terminal's width with 'stty size' but i dont know how to then convert input... (2 Replies)
Discussion started by: scyptnex
2 Replies
7. Shell Programming and Scripting
(/home/user1)-> more script.sh
#!/bin/ksh
( echo open devicename
sleep 3;
echo user;
sleep 2;
echo password;
sleep 2;
echo "/info/dump"; ---------> This needs to redirect to a file .Can be number of pages
sleep 2;
echo "exit" ) | telnet
Please use code tags next time for... (2 Replies)
Discussion started by: necro98
2 Replies
8. UNIX for Dummies Questions & Answers
Hi all !
I noticed something very weird.
I have a large pipe delimited file (20 fields/3,000 records) that looks like that:
AAA|BBB|11111|22222|...|($NF of record 1)
CCC|DDD|33333|44444|...|($NF of record 2)
CCC|DDD|55555|66666|...|($NF of record 3)
For the lines with same 1st and 2nd... (3 Replies)
Discussion started by: beca123456
3 Replies
9. Shell Programming and Scripting
I am having a bash script which is basically invoking a python program to validate the Source Query results against the target query results. I am placing all the queries in a .sql file.
I want to write to a Error log file incase if the syntax is wrong or if the column is not present in the... (4 Replies)
Discussion started by: ronitreddy
4 Replies
10. Shell Programming and Scripting
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
MAN(1) General Commands Manual MAN(1)
NAME
man - print sections of this manual
SYNOPSIS
man [ option ... ] [ chapter ] title ...
DESCRIPTION
Man locates and prints the section of this manual named title in the specified chapter. (In this context, the word `page' is often used as
a synonym for `section'.) The title is entered in lower case. The chapter number does not need a letter suffix. If no chapter is speci-
fied, the whole manual is searched for title and all occurrences of it are printed.
Options and their meanings are:
-t Phototypeset the section using troff(1).
-n Print the section on the standard output using nroff(1).
-k Display the output on a Tektronix 4014 terminal using troff(1) and tc(1).
-e Appended or prefixed to any of the above causes the manual section to be preprocessed by neqn or eqn(1); -e alone means -te.
-w Print the path names of the manual sections, but do not print the sections themselves.
(default)
Copy an already formatted manual section to the terminal, or, if none is available, act as -n. It may be necessary to use a filter
to adapt the output to the particular terminal's characteristics.
Further options, e.g. to specify the kind of terminal you have, are passed on to troff(1) or nroff. Options and chapter may be changed
before each title.
For example:
man man
would reproduce this section, as well as any other sections named man that may exist in other chapters of the manual, e.g. man(7).
FILES
/usr/man/man?/*
/usr/man/cat?/*
SEE ALSO
nroff(1), eqn(1), tc(1), man(7)
BUGS
The manual is supposed to be reproducible either on a phototypesetter or on a terminal. However, on a terminal some information is neces-
sarily lost.
MAN(1)