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 08-05-2010, 02:01 AM   #1
pravinkhavate
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Cool application redirect to file


i want to redirect application to file.
i m redirecting it by command
konsole -e 'application name' >> applog.txt
but it is not working.
Please help.....
 
Old 08-05-2010, 04:38 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Quote:
konsole -e 'application name' >> applog.txt
Are you trying to get a log from konsole or the application?

What happens if you just run:
Code:
application >> applog.txt
Also you may need to explain further what you mean by 'not working'? ie is there an error message?
 
Old 08-05-2010, 04:53 AM   #3
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 373
Blog Entries: 2

Rep: Reputation: 32
This worked for me

Quote:
queenz@martin-lucid:~$ vlc >> file.txt
then you can go and open your file ~/file.txt and you will see the output of that program.

mine was..

Quote:
VLC media player 1.0.6 Goldeneye
[0x88f3668] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/queenz/.config/ibus/bus
Bus:pen: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
 
Old 08-05-2010, 07:31 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by pravinkhavate View Post
i want to redirect application to file.
i m redirecting it by command
konsole -e 'application name' >> applog.txt
but it is not working.
Please help.....
What is Konsole supposed to be doing there?
 
Old 08-05-2010, 08:07 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Some applications print using stderr instead of stdout.
You could try either:
command 2>logfile
or
command >logfile 2>&1

The later will redirect stdout to a log file and redirect stderr to stdout.

Last edited by jschiwal; 08-05-2010 at 11:19 PM.
 
  


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
bash: redirect stderr to file including name of file with the error SilversleevesX Programming 11 07-27-2010 03:06 PM
redirect stdout to file produces blank file kissaki Linux - Software 5 01-06-2009 03:28 AM
Xserver: Can I redirect application from one X to another? Astral Projection Linux - Software 3 06-29-2008 12:17 PM
trying to redirect text to a file to cat at later point. says file doesn't exist. dr_zayus69 Programming 1 10-02-2005 08:10 AM
How do I redirect something to a file without it overwriting the destination file??? nikold01 Linux - General 8 09-09-2004 02:30 PM

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

All times are GMT -5. The time now is 08:13 AM.

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