How to make a file in Linux from the command line.

How to make a file in Linux from the command line.

Files are created, edited, deleted, and used by many of the background os processors. file is also used for regular users to accomplish daily tasks such as taking notes, writing code, or simply duplicating content.

There are four types of commands used to make files in Linux.

  1. Cat

  2. Touch

  3. Vim

  4. Nano

Cat commands

The cat command is one of the most universal tools yet all it does is copy standard input to standard.

What Is Cat Command In Linux - Jameslemingthon Blog

There are four works of cat command.

  1. Create a single file.

    cat > filename

  2. Concatenate file - to add more than one file into a single file.

    cat file1 file2>file3

  3. Copy file - to copy the context of x into y.

    cat file1>file2

  4. Tac - to see the context from bottom to top.

    tac filename .bottom to top

Touch commands

The touch command is a standard command used in the Linux operating system which is used to create, change and modify the timestamps of a file. Touch command creating an empty file.

Linux/Unix: TOUCH command example - Gurugubelli Technologies

  1. Creating an empty file with any content.

    Command = touch filename

  2. Creating multiple empty files.

    Command = touch multiple filenames

  3. Changes all timestamps of files.

  4. Update only the access time of the file, and modify time of the file.

Timestamp-

  1. Access time ( last time when file was accessed) = touch -a filename

  2. Modify time ( last time when a file was modified) = touch -m filename

  3. Change time ( last time when file metadata was changed)

Vi editor command

A programmer text editor. It can be used to edit all kinds of plan text, it is specially useful for editing for Linux programs.

Vim Command in Linux | How does Vim Command works in Linux?

Note

  1. w -- to saw.

  2. :wq or x-- to saw & quit

  3. :q -- quit

  4. :q! -- force quit no, save

Vi is standard whereas "Nano" has to be available depending on the Linux you use.

Nano command

explain the basic usage of the nano editor, including how to create and open a file, edit a file, save a file, search and replace text, cut and paste text, and more. Nano text editor is pre-installed on macOS and most Linux distros.

Edit File Without Vim Linux - Waraqa Blog


Git

GitHub

1. Git is software.

GitHub is a service.

2. Git is a command-line tool

GitHub is a graphical user interface

3. Git is installed locally on the system

GitHub is hosted on the web

4. Git is maintained by linux.

GitHub is maintained by Microsoft.

5. Git is focused on version control and code sharing.

GitHub is focused on centralized source code hosting.

6. Git is a version control system to manage source code history.

GitHub is a hosting service for Git repositories.

7. Git was first released in 2005.

GitHub was launched in 2008.

8. Git has no user management feature.

GitHub has a built-in user management feature.

9. Git is open-source licensed.

GitHub includes a free-tier and pay-for-use tier.

10. Git has minimal external tool configuration.

GitHub has an active marketplace for tool integration.

11. Git provides a Desktop interface named Git Gui.

GitHub provides a Desktop interface named GitHub Desktop.

12. Git competes with CVS, Azure DevOps Server, Subversion, Mercurial, etc.

GitHub competes with GitLab, Bit Bucket, AWS Code Commit, etc.Thanks for reading.

How to Add a LinkedIn Follow Button to Your Web Site | The Social Media ...