LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-12-2007, 06:23 AM   #1
varankv
LQ Newbie
 
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Post Launching files (test.txt) from a terminal window


Hi,

The question might be silly one..!! However, I would like to get response from linux lovers.

How do I launch a text file (for example test.txt) from a terminal window on Linux ?
(This can be done be easily on the windows). This is something to do with the file/mime type associations.
Can anybody help me in this. ?

Regards
Varan
 
Old 10-12-2007, 06:44 AM   #2
jimbo1954
Member
 
Registered: Oct 2006
Location: High Wycombe, Bucks, UK.
Distribution: Debian and Fedora Core in equal measure
Posts: 264

Rep: Reputation: 33
"launching" a text file

Well, the answer pretty much depends upon what you want to do and where you start from. If you click on the file icon in the GUI, you will get an option of running it or displaying it in a window, so you can view the contents that way.

If you are in the CLI, you can "more" (or "less") the file, which will give you a copy of the contents in the terminal window. Alternatively, you could "vi" the file, which would open it so you could view it and/or edit it

HTH
 
Old 10-12-2007, 12:43 PM   #3
Hiko
Member
 
Registered: Oct 2007
Location: Penn Valley, CA.
Distribution: Arch, Ubuntu, Fedora, Mint
Posts: 52

Rep: Reputation: 16
Aloha,
Or you could type

gedit test.txt

and it will open it in the Gnome Text Editor or

kedit test.txt

and it will open it in the KDE Text editor....
Mahalo,
Edward
 
Old 11-13-2007, 12:32 AM   #4
najihah
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
hi

previous question was about text file
what about c files.... i had problems to launch the c programming that i wrote in anjuta ....

jiha

Last edited by najihah; 11-13-2007 at 12:35 AM.
 
Old 11-13-2007, 02:59 PM   #5
Hiko
Member
 
Registered: Oct 2007
Location: Penn Valley, CA.
Distribution: Arch, Ubuntu, Fedora, Mint
Posts: 52

Rep: Reputation: 16
Aloha,
Have you compiled the c file and made it executable?
Mahalo,
Edward
 
Old 11-14-2007, 01:17 AM   #6
najihah
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
i've already compiled it... i used gcc... n i wrote in gedit instead of anjuta
 
  


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
Difference between a Shell terminal window and the KDE Linux Console terminal window? bostonantifan Fedora 2 03-25-2007 07:23 PM
Open .txt file using OpenOffice through terminal jojojo Linux - Newbie 3 05-31-2006 11:18 AM
Launching a program as root without using the terminal Crushing Belial Linux - Software 2 11-20-2005 10:38 PM
Reading a txt file in terminal over a network mdlister Programming 5 03-14-2005 07:47 AM
Bash, how do I test for *.txt files in a directory with IF? severian23 Programming 7 11-04-2004 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:29 PM.

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