LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 05-23-2009, 06:00 AM   #1
satya_seth
LQ Newbie
 
Registered: May 2009
Posts: 11

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


Hi

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

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

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

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

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 02:04 PM
bash command redirecting output to file freeindy Programming 10 11-08-2007 05:48 AM
Gnome terminal command history problem ssrini *BSD 1 07-26-2005 09:55 AM
Redirecting output of running command tommyr1216 Linux - General 3 03-04-2005 08:20 PM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 04:35 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration