Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-07-2007, 02:03 PM   #1
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.




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, 02:08 PM   #2
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, 02:08 PM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
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, 02:14 PM   #4
Registered: Jan 2006
Location: Great White North
Distribution: openSUSE 10.2, openSUSE 10.3 (VM)
Posts: 44

Original Poster
Rep: Reputation: 15
Great, thanks.


How could I have missed that.


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

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration