How to create a new file / an empty file using command or shortcut or without command?

How to create a new file / an empty file using command or shortcut or without command?

Like To create new Folder,

shortcut: Ctrl + Shift + N
Right click and create New Folder
3

2 Answers

  1. Using touch filename.fileextention

    touch filename.fileextention For ex. - touch test.txt
  2. Using >filename.fileextention

    >filename.fileextention
    For ex. - >test.txt
  3. create any fileextention template in Home/Templates and you can access that template to create file. For ex. create test.txt file in Home/Templates folder. Now wherever you wants to create an .txt extention file you can simply create using right click-> New Document- -> test

There is the "Templates" mechanism, which still works but is kind of hidden nowadays.

In your home directory, create a "Templates" folder. In that folder, you can place for example an empty file called "Plain Text.txt".

Once this directory exists and contains at least a file, you will have a right-click menu item "New Document" when you right-click an empty space in the folder. You can select your "Plain Text" menu entry, and that will create a copy of the empty "Plain Text.txt" in your current folder.

You can place different template files there, e.g. another one with an empty Writer file, letter templates, etc.

In standard Ubuntu, no Templates folder is created by default. Then, Files does not provide a right-click menu item. That makes it difficult to discover this feature, which exists for a long time.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like