LinuxQuestions.org
Help answer threads with 0 replies.
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 10-27-2007, 03:06 AM   #1
webb.ryan
Member
 
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37

Rep: Reputation: 15
Talking how to open *.conf files in linux terminal


Hello everyone^^,

I have a little problem with opening a file for example, a squid.conf file in a linux terminal..

if i am in windows and for example the squid.conf is at c:\squid\squid.conf, i would just type in the commandd prompt:

c: <enter>
cd squid <enter>
squid.conf <enter>


then the squid.conf will appear in a text editor(notepad).

...I tried the same in linux terminal(konsole) and the file wont open..
if someone can show me, i would be very greatful...

~ryan
 
Old 10-27-2007, 03:15 AM   #2
KrazyKanuk
Member
 
Registered: Sep 2007
Location: Nottingham, Maryland
Distribution: Slackware 13/64 bit
Posts: 91

Rep: Reputation: 15
try cd squid then pico|vi|nano squid.conf vi editor is most popular I believe pico is my personal preference.
 
Old 10-27-2007, 03:41 AM   #3
webb.ryan
Member
 
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37

Original Poster
Rep: Reputation: 15
KrazyKanuk,

thanks for your kind reply, i will try your suggestion.

~ryan^^
 
Old 10-27-2007, 03:50 AM   #4
webb.ryan
Member
 
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37

Original Poster
Rep: Reputation: 15
Red face

krazykanuk,

yes your suggestion worked thanks!...

but i had a problem with editing the conf file.
how do i open it with gEdit? (also using the linux terminal)

~ryan
 
Old 10-27-2007, 03:53 AM   #5
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Regardless of what editor you'd like to use, you should be able to view it by typing the editor's name and then the filename, for example:

Code:
$ pico testfile.conf
$ vi testfile.conf
$ mcedit testfile.conf
$ gedit testfile.conf
And so on (the '$' represents the prompt).
 
Old 10-27-2007, 03:58 AM   #6
KrazyKanuk
Member
 
Registered: Sep 2007
Location: Nottingham, Maryland
Distribution: Slackware 13/64 bit
Posts: 91

Rep: Reputation: 15
I would think start gedit then goto File then Open the file won't be listed because it is hidden (hence the period at the beginning of the filename) but if you have a place where you can type in a location or filename you can open it like that. I don't have gedit so I can't check to make sure. Using the terminal is easy just "vi /path to squid.conf/squid.conf" (without quotes).
 
Old 10-27-2007, 06:56 AM   #7
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Also if you just want to view a files content use the cat command,like so cat /path/file.conf if the file is a large file pipe it to less or more like so cat /path/file.name | less or cat /path/file.name | more
But if you need to make changes to the file, as others have said use your favorite editor.
 
Old 10-27-2007, 07:15 AM   #8
webb.ryan
Member
 
Registered: Oct 2007
Location: Philippines / Pilipinas
Distribution: FedoraCore5 :: Debian Etch
Posts: 37

Original Poster
Rep: Reputation: 15
Wink

thank you very much for all your replies!

i now understand how to open and change! yey!

~warmest thanks
~~Ryan^^
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open house for open source: Linux.conf.au day four LXer Syndicated Linux News 0 01-20-2007 02:54 PM
LXer: linux.conf.au 2007 programme and registrations open! LXer Syndicated Linux News 0 11-01-2006 08:33 PM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM
SUSE 9.1: named.conf works, but including separate conf files doesn't??? registering Linux - Distributions 0 06-09-2004 05:03 PM
Open Linux Terminal from remote Windows machine m1ke Linux - Networking 5 11-12-2001 02:34 AM


All times are GMT -5. The time now is 05:00 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration