Skip to main content

Posts

Showing posts from February, 2023

Bash Scripting

  How to Create Your First Bash Scrip touch hello_world.sh Find the path to your bash shell. where bash is located which bash touch hello.sh ls -al Permission of file #! bin bash #! /bin/bash echo "hello" for execute ./hello.sh Comment # before line of comment it give more information about script ++++++++++++++++++++++++++++++++++++++++++++++ when ever we define a Variable it can store somedata string data any no or any other kind of data 1 System variable 2 Userdefine variable System variable echo $BASH echo $BASH_VERSION echo $HOME echo $HASH_VERSION echo $PWD 2. USERDEFINE VARIABLE name = Mark echo $name echo "this is my $name +++++++++++++++++++++++++ #To take the input from user echo "enter name: " read name echo "entered name $name" ++++++++++++++++++ for multiple name echo "enter name: " read name1 name2 echo "Names: entered $name, $name1, $name2" +++++++++++ to print on same line read -p 'usena

All About Linux

  File System cd / It go to root dir. or main dir. ls -ltr it show pre define folder or dir. shows *Everything in linux is a File* we used audio video in daily life that called file but in linux command is also consider as a file Whereis ls cd /usr/bin ls All file avaible all commands avaible file also present To manage all the data and file linux need a file system Os store and manage data on disk or partitions using a structure called filesystem FileSystem includes files, directories and its related permissions. Fs stores data in hierarchy of directories and files. In Windows  INSIDE THE FOLDER LINUX FILE STRUCTURE Types of file system/ versions 1. ext3 extended 3  2. ext4 3. XFS 4. FAT 5. BTRFS etc.. How to check your linux filesystem? lsblk -f 1. XFS (EXTENTS FILE SYSTEM) XFS is 64bit high performance FS support parallel I/O operations works well with large files <Which file we have to use> its depends on application and user requirments cd/ ----> root dirctory or main dir