Category: Linux Terminal

Added: 16th of August 2020

Viewed: 804 times

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

The first question you might is ask is why you would want to create a new directory and file using the terminal when you can already do this through your file manager on Linux. If you are logged in to a remote Linux machine and don't have access to a remote desktop you can then create this using the terminal.

To create a new directory in Linux using the terminal we can use the mkdir command

mkdir sample_directory


After this we need to CD in to that sample_directory we created
cd sample_directory


To create a new file in Linux using the terminal we can use the touch command
touch sample_file.txt


To list the file in the directory we can use the dir or ls commands
ls

Other Tips & Tutorials

Linux Terminal

Kill multiple processes using the pkill command in Linux

Posted: 5th of January 2021

Views: 721

Linux Terminal

Display free memory using the terminal in Linux

Posted: 17th of December 2020

Views: 675

Linux Terminal

Using mlocate to find files by name, extension using the terminal in Linux

Posted: 27th of November 2020

Views: 595

Linux Terminal

Capture screenshots of websites using cutycapt in different formats using the terminal in Ubuntu and Ubuntu based distributions

Posted: 15th of November 2020

Views: 831

Linux Terminal

Display a calendar in the terminal

Posted: 6th of November 2020

Views: 747

Linux Terminal

Create a simple cronjob in Linux

Posted: 20th of October 2020

Views: 858

Linux Terminal

Create a new folder and file using the mkdir and touch commands using the terminal in Linux

Posted: 16th of August 2020

Views: 804

Linux Terminal

Convert a PDF document to text or html using pdftotext, pdftohtml in Linux using the terminal

Posted: 3rd of August 2020

Views: 1217

Linux Terminal

List files in a directory using the ls command

Posted: 22nd of July 2020

Views: 841

Linux Terminal

How to access HP Linux Imaging and Printing System set up on Ubuntu using the terminal

Posted: 13th of November 2019

Views: 1487