PWD – Linux command to check current working directory

PWD – Linux command to check current working directory   When you first open the terminal, you are in the home directory of your user. To know which directory you are in, you can use the “pwd” command. It gives us the absolute path, which means the path that starts from the root. The root is the … Read more

Filter Logs with Grep : linux Command Grep

grep linux command

Filter Logs with Grep : linux Command Grep Let’s understand the use of grep is to extract useful information from system logs: grep -Eoc “^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.* 200” /srv/www/example.com/logs/access.log   In this command, grep filters an Apache access log for all lines that begin with an IP address, followed by a number of characters, a space and then the … Read more

Vi – Linux file editor

vi-editor

Vi – Linux file editor If you find that vi is hard to use, there is some good news: RHEL uses a user-friendly version of vi called vim, for “vi improved.” To start vim, just use the vi command. In this section, I will provide you with the bare essentials that are needed to work … Read more

IPTABLES : Introduction to Linux Firewall

firewall

IPTABLES : Introduction to Linux Firewall   Linux is the most-used open source operating system. Managing network traffic is one of the toughest jobs to deal with.  For this, we must configure the firewall in such a way that it meets the system and users requirements without leaving the system vulnerable. The default firewall in most of the Linux distributions is IPTables. IPTables is … Read more

Setup SFTP Server on linux

Linux yum

Setup SFTP Server on linux CentOS 7 or any Linux server distribution is a very powerful server that performs above and beyond what your business might need. Whatever task you throw at the server, it will be ready. And, if it isn’t ready out of the box, you can make it so. A complete and simple … Read more

SELinux : Introduction to SELinux

understanding selinux

SELinux : Introduction to SELinux SELinux, or Security-Enhanced Linux, is a part of the Linux security kernel that acts as a protective agent on servers. In the Linux kernel, SELinux relies on mandatory access controls (MAC) that restrict users to rules and policies set by the system administrator. MAC is a higher level of access … Read more

Find Files and Directories Based on Size in Linux

find command linux

Find Files and Directories Based on Size in Linux In Unix-like and some other operating systems, find is a command-line utility that searches one or more directory trees of a file system, locates files based on some user-specified criteria and applies a user-specified action on each matched file. To find all 50MB files, use. # find / … Read more

Find Files and Directories Based on Modification Time in Linux

find command linux

Find Files and Directories Based on Modification Time in Linux In Unix-like and some other operating systems, find is a command-line utility that searches one or more directory trees of a file system, locates files based on some user-specified criteria and applies a user-specified action on each matched file. Find Last 50 Days Modified Files … Read more

Search Files Based On Owners and Groups in Linux

find command linux

Search Files Based On Owners and Groups in Linux In Unix-like and some other operating systems, find is a command-line utility that searches one or more directory trees of a file system, locates files based on some user-specified criteria and applies a user-specified action on each matched file. To find all or single file called testdata.txt under / root … Read more