Found 1437 Articles for Linux

How to remove a committed file from the Git repository?

kannan sudhakaran
Updated on 20-Feb-2021 08:35:06

1K+ Views

Git allows you to delete a file from the repository using any of the following methods −Using the Linux rm commandUsing the git rm commandScenario 1 − Use the Linux rm commandThe syntax of the Linux rm command is −$ git rm Let us assume that a file “file1.python” exists in the repository. Use the Linux rm command to delete the file − “file1.python”.$ git rm file1.pythonLet us first verify if the file has been removed from the working directory. This can be verified by using the Linux ls command.$ lsThe output suggests that the file has been removed from ... Read More

What are the steps to rename a file in Git?

kannan sudhakaran
Updated on 20-Feb-2021 08:33:12

3K+ Views

A file can be renamed in the following two ways −Use the mv Linux commandUse the git mv commandScenario 1 − Use the Linux mv commandThe following example assumes that a file “file1.txt” exists in the repository. The syntax for using the Linux mv command is −$ mv Use the Linux command mv to rename the file to “file1.java”.$ mv file1.txt file1.javaExecute the git status command to verify the file’s status in Git.$ git statusThe output in the screenshot suggests that the file has been renamed in two steps −“file1.txt” has been deleted from the working areaA new file ... Read More

Why should you use git add command before using git commit command?

kannan sudhakaran
Updated on 20-Feb-2021 08:31:42

4K+ Views

The git add command adds files to the staging area whereas the git commit command will write changes to the repository permanently.When you have completed an important feature, you will need to create a snapshot of that change and save it to the Git repository. To achieve this, you will perform a commit.In Git, there exists an intermediate step before commit which does not exist in other version control systems. This intermediate step is called a staging area. The staging area is also known as the index. The staging area can be used to build up a set of changes ... Read More

How do you handle End-of-Line characters in Git on Windows / Linux / Mac Operating Systems?

kannan sudhakaran
Updated on 20-Feb-2021 08:29:40

2K+ Views

This question can also be rephrased as − How do you resolve the Git warning − "LF will be replaced by CRLF"?The End−of−Line is marked using two special characters "\r" in Windows Operating System while the “" character is used to mark End-of-Line in MacOS and Linux systems.The \r and are known as the Carriage Return (CR) and Line Feed (LF) characters respectively. It is important to handle End-of-Line characters properly for consistency across multiple Operating Systems.End−of−Line characters can be configured in two ways −At the time of installation −At the time of installation, Git allows us to select from ... Read More

What is .git folder and why is it hidden?

kannan sudhakaran
Updated on 20-Feb-2021 08:26:14

19K+ Views

Git is currently the most popular version control system. A version control system records the changes made to our project codebase in a special kind of file system-based database. In Git, this database is known as a repository and its structure is inspired by the Linux file system. The repository maintains a history of the changes to our codebase.The .git folder contains all information that is necessary for the project and all information relating commits, remote repository address, etc. It also contains a log that stores the commit history. This log can help you to roll back to the desired ... Read More

How to change the default configuration in Git?

kannan sudhakaran
Updated on 20-Feb-2021 08:24:06

655 Views

The default configuration should be modified when you use Git for the first time. The git config command can be used to achieve the same. The following are some Git configuration settings that can be set −NameEmailDefault EditorLine EndingsGit allows us to configure the above settings at different levels. This means we can have different settings for different repositories of different projects. All configurations are stored in a configuration file.SyntaxThe syntax to modify Git’s configuration is −git config configuration_name [additional_flags]Git configuration can be modified at the following levels −System − System−level configuration is applied across an entire machine and ... Read More

Cover the Tracks using covermyass

Ajay yadav
Updated on 29-Sep-2020 11:02:19

246 Views

It is imperative to fully cover your tracks you made on the systems during assault. This tool is designed for pen testing "covering tracks" phase, before exiting the infected server. Or, permanently disable system logs for post-exploitation.This tool allows you to clear log files such as −/var/log/messages # General message and system related stuff/var/log/auth.log # Authenication logs/var/log/kern.log # Kernel logs/var/log/cron.log # Crond logs/var/log/maillog # Mail server logs/var/log/boot.log # System boot log/var/log/mysqld.log # MySQL database server log file/var/log/qmail # Qmail log directory/var/log/httpd # Apache access and error logs directory/var/log/lighttpd # Lighttpd access and error logs directory/var/log/secure # Authentication log/var/log/utmp # Login ... Read More

Difference between TCP and UDP

Kiran Kumar Panigrahi
Updated on 08-Sep-2023 22:25:57

32K+ Views

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the most widely used Internet protocols. TCP is a connection-oriented protocol, which means, once a connection is established, data can be sent bidirectional. UDP, on the other hand, is a simpler, connectionless Internet protocol. Multiple messages are sent as packets in chunks using UDP. Go through this article to find out more about TCP and UDP and how they differ from each other. What is TCP? TCP is a transport layer connection-oriented protocol. It provides a reliable connection and protected data transmission between the connected machines over a network. ... Read More

Difference between Fedora and CentOS

Mahesh Parahar
Updated on 16-Apr-2020 06:51:18

147 Views

FedoraFedora is Linux based and open-source operating system intended for developers and system administrators. It is supported by a huge Red Hat Community. It was introduced in Sep 2003. Initially, it was also known as Fedore Core. Fedora OS uses IPSec to connect to remote machines or networks. It uses Internet Key Exchange, IKE protocol to make secure, robust connections between machines.CentOSCentOS is also Linux based open-source distributed operating system. It is quite stable and robust. It was developed over source code Red Hat Enterprise Linux, RHEL and is actively developed by CentOS community which have large number of network ... Read More

Difference between Fedora and Red Hat

Mahesh Parahar
Updated on 16-Apr-2020 06:46:41

982 Views

FedoraFedora is Linux based and open-source operating system intended for developers and system administrators. It is supported by a huge Red Hat Community. It was introduced in Sep 2003. Initially, it was also known as Fedora Core. Fedora OS uses IPSec to connect to remote machines or networks. It uses Internet Key Exchange, IKE protocol to make secure, robust connections between machines.Red HatRed Hat Enterprise Linux, RHEL is also Linux based operating system but it is targetted for business usage. It is sold using annual/monthly subscription basis including the technical support and Red Hat network. It was introduced in 1994 ... Read More

Advertisements