LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-07-2007, 03:03 PM   #1
daTerminehtor
Member
 
Registered: Jan 2006
Location: Great White North
Distribution: openSUSE 10.2, openSUSE 10.3 (VM)
Posts: 44

Rep: Reputation: 15
mkdir make a file equivalent?


After spending 15 minutes with google and search, I'll simply ask...

How to make a file, as root?

I'm trying to make 'auth.smb' in /etc/samba to store my windows login for a share.

Course...

mkfil
makefile
mkfile...

<meh>

Not a lot of success searching for words with few letters.

How, do I make a file as root, and store info in it?
 
Old 05-07-2007, 03:08 PM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
The command is "touch" (obviously ).
 
Old 05-07-2007, 03:08 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
touch filename

Or simply open up your favorite text editor like vi and save it after opening it.

vi filename

Or you can even do:

echo "This is some info or data" > filename
 
Old 05-07-2007, 03:14 PM   #4
daTerminehtor
Member
 
Registered: Jan 2006
Location: Great White North
Distribution: openSUSE 10.2, openSUSE 10.3 (VM)
Posts: 44

Original Poster
Rep: Reputation: 15
Great, thanks.

touch...

How could I have missed that.
 
  


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
Trying to make a directory with mkdir using the date command. Altheastronut Linux - General 5 06-09-2009 01:14 PM
mkdir: cannot create directory `test': Read-only file system punt Linux - General 2 04-16-2005 10:58 PM
Unpacking files=Cannot mkdir: Read-only file system Regenten Linux - Newbie 5 09-08-2004 04:23 AM
"mkdir: cannot create directory `foo': Read-only file system" on FAT32 maddes Linux - Hardware 1 11-26-2003 07:19 PM
What's the redhat's equivalent of the gentoo's /etc/make.conf? raylpc Linux - General 2 07-31-2003 08:57 AM


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