Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-23-2009, 07:00 AM   #1
LQ Newbie
Registered: May 2009
Posts: 11

Rep: Reputation: 0
Problem in redirecting the output of command in gnome-terminal


I am opening a gnome-terminal in "execute command mode" through another terminal and i want to redirect the output of that command to a file. But it is not able to redirect it to the file.

I have made the following observations
1. Opened a terminal.
2. Given command gnome-terminal --command "ls -al > temp.txt"
3. Observed that it is not crating any file of name "temp.txt"

I have tried xterm also. But i faced some other problem in that. So, i am trying to move to gnome-terminal.

Is there any other alternative.

Can anyone help me out

Old 05-23-2009, 07:05 AM   #2
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
gnome-terminal --command `ls -al > temp.txt`
off the top of my head. Notice the use of ` as opposed to "

Sorry, wrong: you need an equals sign
gnome-terminal --command="ls -al> temp.txt"

Last edited by jamescondron; 05-23-2009 at 07:07 AM. Reason: Wrong answer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I resize the terminal window from the command line in the gnome terminal QuIcKSpArK Linux - Newbie 5 04-21-2012 03:04 PM
bash command redirecting output to file freeindy Programming 10 11-08-2007 06:48 AM
Gnome terminal command history problem ssrini *BSD 1 07-26-2005 10:55 AM
Redirecting output of running command tommyr1216 Linux - General 3 03-04-2005 09:20 PM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 05:35 PM

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration