LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   application redirect to file (https://www.linuxquestions.org/questions/linux-newbie-8/application-redirect-to-file-824287/)

pravinkhavate 08-05-2010 02:01 AM

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.....

grail 08-05-2010 04:38 AM

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?

QueenZ 08-05-2010 04:53 AM

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::open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon

MTK358 08-05-2010 07:31 AM

Quote:

Originally Posted by pravinkhavate (Post 4056417)
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?

jschiwal 08-05-2010 08:07 AM

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.


All times are GMT -5. The time now is 09:27 AM.