Category «Uncategorized»

Logical Volume Management

The Linux Logical Volume Manager (LVM) is a mechanism to virtualize the disks. It can create “virtual” disk partitions out of one or more physical hard drives, allowing you to grow, shrink, or move those partitions from drive to drive as your needs change. It also allows you to create larger partitions than you could …

Logical Volume Management Practice

Creating a Physical Volume (PV): Create a partition using fdisk, and change the hex code of it to Save and exit the fdisk and update the partition table using fdisk /dev/sda command. Create 3 Physical volumes from 3 physical disks (/dev/sda8, /dev/sda9, /dev/sda10). [root@localhost ~]# fdisk -l Device Boot Start End Blocks Id System /dev/sda1 …

Partition Practice RHEL7

To view the existing partitions: #fdisk –l or parted –l [root@localhost ~]# fdisk -l Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x00048379 …

Managing Partitions & File System

What is a partition? Partitioning is a means to divide a single hard drive into many logical drives. A partition is a contiguous set of blocks on a drive that is treated as an independent disk. A partition table is an index that relates sections of the hard drive to partitions. Why have multiple partitions? …

File Permissions

Permissions are applied on three levels:- Owner or User level Group level Others level Access modes are of three types:- r read only w write/edit/delete/append x execute/run a command Access modes are different on file and directory: Permissions Files Directory R Open the file ‘ls’ the contents of dir W Write, edit, append, delete file …

Find Command

find command is used to find the files or directory’s path, it is exactly like the find option in windows where you can search for a file. Syntax: find / (under root) –option filename Options that can be used with find command: Finding a File with name#find / -name linuxfile [root@localhost ~]# find / -name …

Filter Commands:

Filter commands are used to filter the output so that the required things can easily be picked up. The commands which are used to filter the output are less more head tail sort cut sed less:- The less command is used to see the output line wise or page wise. Ex: less /etc/passwd [root@localhost ~]# …

Global Regular Expression Print(GREP)

Regular Expressions, Pipelines & I/O Redirections Grep:Grep stands for Global Regular Expression Print. It is used to pick out the required expression from the file and print the output. If grep is combined with another command it can be used to pick out the selected word, phrase from the output of first command and print …

VIM Editor

VI             Visual display editorVIM         Visual display editor improved This is command mode editor for files. Other editors in Linux are emacs, geditvi editor is most popular It has 3 modes: Command Mode Insert mode (edit mode) extended command mode Note: When you open the vim editor, it will be in the command mode …

Basic Commands

Creating, Removing, Copying, Moving files & Directories Creating a file in Linux using cat command: cat (Concatenate) command is used to create a file and to display and modify the contents of a file. To create a file # cat > filename (say lbfile).Linux BasicsCtrl+d (To save the file). [root@localhost ~]# cat > lbfile Linux …