LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2003, 06:45 PM   #1
dsgdevil
Member
 
Registered: Jan 2003
Distribution: RedHat Linux 9
Posts: 126

Rep: Reputation: 15
Terminal question


I'm wondering if i can edit or create a file with only the terminal.Please answer.
 
Old 08-26-2003, 06:52 PM   #2
eltongeoff
Member
 
Registered: Mar 2003
Posts: 76

Rep: Reputation: 15
yes. to create a file, use the command touch, ie

touch fakefile

to edit, use a text editor like nano or pico.

nano fakefile

if the file doesn't exist, u can also do nano, then on saving the file will be created.
 
Old 08-26-2003, 06:52 PM   #3
rahulsundaram
Member
 
Registered: May 2003
Location: India
Distribution: Knoppix, RedHat
Posts: 246

Rep: Reputation: 30
hi

ya. of course you can. use a command line editor like vi or emacs. vi is small and fast while emacs is more slow but powerful. if you want to create an empty file

touch filename will create it.

if you dont know to use vi

here is a quick help

vi

press i to go into insert mode and type whatever you want

esc :wq will save and quit the file


in emacs


control x control f will ask for filename. specify a new filename on the bottom. control x control c will quit after asking you whether you want to save the file

hope that helpds

regards
rahul sundaram
 
Old 08-26-2003, 06:53 PM   #4
eltongeoff
Member
 
Registered: Mar 2003
Posts: 76

Rep: Reputation: 15
oh damn same time........
 
Old 08-26-2003, 09:08 PM   #5
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Many configuration files require you to be root user before opening on the command line - remember to su to root user first.
 
Old 08-26-2003, 09:26 PM   #6
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: Debian Wheezy
Posts: 2,872

Rep: Reputation: 88
Quote:
I'm wondering if i can edit or create a file with only the terminal
Of course. That's how they dunned it before all them pretty pictures wuz on yur computer.
 
Old 08-26-2003, 11:44 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Technically, a full screen editor like that is just another ui. For the barest bones editor in the world, like DOS' COPY CON

'cat > filename'
text
ctrl-d

Then if you need to fix something, maybe sed. I'd think even 'ed' was cheating as it's got its own line interface.
 
  


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
Terminal question Optimistic Slackware 2 08-15-2004 01:39 PM
Terminal Emulators Question ximiansavior Linux - Software 4 11-17-2003 07:07 AM
terminal question gonzalezjay Linux - General 7 10-16-2003 07:05 PM
Terminal question SnowSurfAir Linux - Software 2 08-17-2003 08:22 PM
terminal question DrOzz Linux - General 3 06-22-2003 12:15 AM


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