- Forums
- Linux
- How Do I Create A Text File In My Linux Shell?
This Post Is About Creating A Simple Text File With The Linux Shell Command In The Terminal Console Of Unix Systems [3276], Last Updated: Mon Jun 24, 2024
Webune Support
Sat Dec 19, 2009
0 Comments
489 Visits
Welcome to Webune Web Hosting
we provide dedicated linux servers
if you are reading this post is probably because you want to know what command you can use to make a file with just one command using the linux shell.
well, you're in luck. we will show you how to create a file very easy with just one command
before we begin, you must be logged into a shell session.
now that you are in the shell send this command:
SHELL COMMAND:
cat > webune.txt
TYPE:
Hello, I am creating webune.txt file using Webune's Tutorials
Now hit Control-D, to exit
Now enter the ls command to list the files
SHELL COMMAND:
ls
you should see webune.txt in your list, now view the contents of webune.txt with this command:
SHELL COMMAND:
cat webune.txt
you should see:
Hello, I am creating webune.txt file using Webune's Tutorials