lsof command can be used to check which process is occupying port 8080. lsof command stands for List Of Open File. It provides a -i option that can be used to check…
Author: admin
How to run a command on the remote server using SSH command?
Overview Using the ‘ssh’ command with the ‘-t’ parameter, we can run commands on a remote server. Syntax: Examples: Note: – For authentication on the server, you can use the following two ways. Public-Private…
How to run a command in the background on Linux
Overview Using ‘&’ command Using ‘bg’ command Using ‘nohup’ utility Using ‘&’ command Use & at the last of the command to send the command in the background. Syntax Example: Note:– This…
How to redirect the output/error of command to file on Linux?
File descriptors: These are files that get opened as soon as you run any command in the terminal. 0 – Standard Input (STDIN) 1 – Standard Output (STDOUT) 2 – Standard Error(STDERR)…
How to delete contents of a file using vi or vim in bash/termial (Linux)
Overview The below shortcut can be used to delete all contents of a file using bash/terminal when using vi or vim. Example Let’s see an example First let’s create and write to…
How to set line numbers in a file using vi or vim (Linux)
Overview Usually, a Linux file is displayed without line numbers when opened with vi or vim. The below command can be used to display line numbers in vi or vim editor Example…
How to go to the last line of a file in Linux
Overview When it comes to very large files, e.g while visiting some log files, the user may want to jump to the last line of the file to see the latest entry. …
Clear terminal screen on Mac Non-Scrollable
Overview The below shortcut can be used to clear the terminal screen on Mac Once the above shortcut is executed, then the terminal screen will be cleared. Also, the screen will be…
How to go a particular line using line number in a file using vi or vim (Linux)
Overview Usually, a Linux file is displayed without line numbers when opened with vi or vim. To go to a line number first we have to display the line number. The below…
Difference between soft links and hard links in Linux?
Before looking into the difference, we should look at “what is inode” in brief first. What is inode: inode(index node) is the data structure in the Unix-based file system which stores the metadata of the…