Computing.Net > Forums > Unix > Tips in creating files in UNIX

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Tips in creating files in UNIX

Reply to Message Icon

Name: Thennarasu Eswaran
Date: July 14, 2006 at 05:48:13 Pacific
OS: UNIX
CPU/Ram: 256 MB
Product: INTEL
Comment:

cat "file1" > file1

Use the above command to create a new file in the name file1.

Thanks,
Thennarasu Eswaran



Sponsored Link
Ads by Google

Response Number 1
Name: janie_rose
Date: July 20, 2006 at 06:52:40 Pacific
Reply:

just try to type it bcoz thats how you can start...

cat > file 1 (you can create your file)

cat >> file1 (you can add lines to your file)

i dont know if this will do just tell me...


0

Response Number 2
Name: Thennarasu Eswaran
Date: July 25, 2006 at 07:47:16 Pacific
Reply:

Hi janie_rose,
It's not the exact answer I think.
First let me explain the problems I faced.
I was in a situation where I need to create a empty file by applying a single UNIX command.
We can use touch command for doing it.
other than tat we can use
cat "file" > file
to create a file in UNIX in the name file.
Let me know your comments !!!

Thanks,
Thennarasu Eswaran


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Tips in creating files in UNIX

Variable Block file in Unix www.computing.net/answers/unix/variable-block-file-in-unix/3532.html

how to span files in unix? www.computing.net/answers/unix/how-to-span-files-in-unix/4954.html

how to read binary files in Unix www.computing.net/answers/unix/how-to-read-binary-files-in-unix/4566.html