LinuxQuestions.org
Review your favorite Linux distribution.
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-16-2007, 02:51 AM   #1
mrryanthai
LQ Newbie
 
Registered: Oct 2007
Posts: 28

Rep: Reputation: 15
help meee


How do you create a file without using an editor?
 
Old 10-16-2007, 03:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
please use better thread titles in future (and say please and thankyou...). also you need to explain more about what you actually mean here... i can run "echo test > /tmp/file" to create a file, is that what you mean?
 
Old 10-16-2007, 03:06 AM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
You can also use the cat command and a "here" document. This is an example from the Linux From Scratch docs and creates the ~/.bashrc file:
Code:
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF
For more info run man bash and search on here documents or run the same search on google.
 
Old 10-16-2007, 03:22 AM   #4
selva146
Member
 
Registered: Oct 2007
Location: INDIA
Distribution: Rehat, Fedora, RHEL
Posts: 47

Rep: Reputation: 15
use the command touch

touch <filename> // creates the file
 
  


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
Help meee!!!...."FAILED TO OPEN SOUND DEVICE. bisanshah Linux - Laptop and Netbook 2 01-09-2007 09:27 PM
Help Meee!!! allblack Linux - Newbie 6 10-10-2004 11:34 AM
Help Meee!!!! I Forgot My Passwd im1crazyassmofo Linux - General 6 05-05-2003 03:15 PM
I cannot enter into my Linux OS. Haaalp meee. Dead Logic Linux - Newbie 16 02-15-2002 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:24 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