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.
Cat
Touch
Vim
Nano
Cat commands
The cat command is one of the most universal tools yet all it does is copy standard input to standard.
There are four works of cat command.
Create a single file.
cat > filename
Concatenate file - to add more than one file into a single file.
cat file1 file2>file3
Copy file - to copy the context of x into y.
cat file1>file2
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.
Creating an empty file with any content.
Command = touch filename
Creating multiple empty files.
Command = touch multiple filenames
Changes all timestamps of files.
Update only the access time of the file, and modify time of the file.
Timestamp-
Access time ( last time when file was accessed) = touch -a filename
Modify time ( last time when a file was modified) = touch -m filename
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.
Note
w -- to saw.
:wq or x-- to saw & quit
:q -- quit
: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.
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.