The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dynamically Creating and Printing to Files Laud12345 Shell Programming and Scripting 1 03-18-2009 10:45 PM
Problem with creating big files eliraza6 Linux 6 11-06-2007 09:54 AM
Problem creating files greater than 2GB bobbyjohnz UNIX for Advanced & Expert Users 1 01-17-2007 12:19 PM
extract tar files without creating directory here2learn UNIX for Dummies Questions & Answers 4 10-02-2006 08:42 PM
Creating a tabulated file from content of 2 or more files jhansrod Shell Programming and Scripting 2 08-08-2005 06:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-12-2008
montana77 montana77 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 6
creating new files

Hello ,

What is the easiest way to get into a directory in solaris and simply create a new file that you can then fill with content?

Thanks
  #2 (permalink)  
Old 04-13-2008
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
Quote:
Originally Posted by montana77 View Post
Hello ,

What is the easiest way to get into a directory in solaris and simply create a new file that you can then fill with content?

Thanks
touch <file>
> <file>
echo <string> > <file>
  #3 (permalink)  
Old 04-13-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,953
Quote:
Originally Posted by montana77 View Post
Hello ,

What is the easiest way to get into a directory in solaris and simply create a new file that you can then fill with content?

Thanks
same way as you would create a file in Solaris.

give the file path ( complete path )
  #4 (permalink)  
Old 04-13-2008
clueless181 clueless181 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 7
at the prompt:

1) cd /<full_path_name>
*cd stands for change directory

2) declare an editor (like VI or Pico) and then the name of the file you want to create - for instance: vi test_file.txt
*you will need to learn some additional commands for the editor you chose to use
  #5 (permalink)  
Old 04-13-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Quote:
Originally Posted by clueless181 View Post
1) cd /<full_path_name>
*cd stands for change directory

2) declare an editor (like VI or Pico) and then the name of the file you want to create - for instance: vi test_file.txt
*you will need to learn some additional commands for the editor you chose to use
Actually there is no requirement to cd to the directory in order to create a file there. Simply edit path/to/directory/newfile (or touch, or cat, or redirect to that file).

The question is slightly weird, as if creating a file would require something special. Provided you have write access to the directory in question, there are few things which are more trivial.
Closed Thread

Bookmarks

« or | Deduping file »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0