Quick Answer: Which Linux Command Can Be Used to Create a Blank File in the Current Directory?
Contents How Do You Create a Blank File in Linux? Use the Command Line to Create a New Blank Text Document in Linux. to Use the Command Line to Create a New...
Contents
How do you create a blank file in Linux?
Use the Command Line to Create a New Blank Text Document in Linux.
To use the command line to create a new, blank text file, press Ctrl + Alt + T to open a Terminal window.
Type the following command and press Enter.
Must Read
How do you create a new file in Linux?
Part 2 Creating a Quick Text File
- Type cat > filename.txt into Terminal. You’ll replace “filename” with your preferred text file name (e.g., “sample”).
- Press ↵ Enter .
- Enter your document’s text.
- Press Ctrl + Z .
- Type ls -l filename.txt into Terminal.
- Press ↵ Enter .