• 4 months ago
How to Create a Text File On a Mac Using Terminal Commands - Basic Tutorial | New #USBFlashDrive #ComputerScienceVideos #Terminal #TerminalCommands #TxtFile

Social Media:
--------------------------------
Twitter: https://twitter.com/ComputerVideos
Instagram: https://www.instagram.com/computer.science.videos/
YouTube: https://www.youtube.com/c/ComputerScienceVideos

CSV GitHub: https://github.com/ComputerScienceVideos
Personal GitHub: https://github.com/RehanAbdullah
--------------------------------
Contact via e-mail
--------------------------------
Business E-Mail: ComputerScienceVideosBusiness@gmail.com
Personal E-Mail: rehan2209@gmail.com

Support us on PayPal: https://www.paypal.com/paypalme/ComputerScienceVideo

© Computer Science Videos 2021

Category

📚
Learning
Transcript
00:00Computer Science videos here today to show you guys in this tutorial how to
00:05create a text file using Terminal on a Mac computer. Without further ado, let us
00:10start the video. So in this tutorial you need to have access to a Mac computer to
00:14be able to use Terminal and Terminal commands to create a text file. So we're
00:21going to start the tutorial. We can now go over onto the Dock. Go to Launchpad
00:25search for the Command Prompt Terminal which should be built into the Mac
00:29computer. Let's now increase the size of the Terminal window. Increase the text
00:35size using Command plus a couple of times. Now before we create the text
00:43file that we wish to create and then use, let's now navigate to the desktop, CD
00:52Desktop, ls-l to view everything on the same line as we change directory. Now
01:01this is the most important part of the video. How to create a text file. How do
01:07we do it? The alternative method without using Terminal or commands is to go
01:15over onto the Dock. Go to Launchpad. Search for your favorite text editor and
01:21then we can create the text file from there. However, in this tutorial the
01:27command to do that is touch and then the name of the text file we wish to create.
01:37Let's just call it file.txt. Enter and there we see file.txt has now been
01:49created on the desktop. What we can do is open that text file if we wish to or we
01:57can open that inside the Terminal Command Prompt. So as you may have seen
02:07in the previous tutorial how that was done, let's do that again. So using the
02:20nano command, nano file, tab, enter and there we are inside the text file using
02:33the command prompt. So let's just type something.
02:38Hello, this is Computer Science Videos. Let's now exit the text file in the
02:58Terminal. Use the cat command to view the contents of the text file in Terminal
03:10and there we go. Hello, this is Computer Science Videos all from the Terminal.
03:19Just to recap, we changed directory to the desktop and listed everything on
03:26screen and then we used the touch command to create file.txt. Then we used
03:32nano to add content to the file.txt and finally the cat command to view
03:40everything on screen. So we can now clear the Terminal, CD, quit Terminal and so
03:51that's it with this video. I'll see you guys in the next tutorial. Thanks for now.
03:57Thank you for making it towards the end of the video. Be sure to subscribe to my
04:01channel Computer Science Videos. Be sure to check out the previous video on
04:06screen now or you can ideally click on the playlist and watch all the journey
04:12for Computer Science Videos from the start until now.

Recommended