Reading view

There are new articles available, click to refresh the page.

Introduction to PostgreSQL database – free online course in Tamil

Introduction to PostgreSQL database – free online course in Tamil

Monday, wednesday, Friday IST evening.

First class – 18-Nov-2024 7-8 PM IST

Syllabus: https://parottasalna.com/postgres-database-syllabus/

Trainer – Syed Jafer – contact.syedjafer@gmail.com

Get the meeting link here

Telegram Group – https://t.me/parottasalna
Whatsapp channel- https://whatsapp.com/channel/0029Vavu8mF2v1IpaPd9np0s Kaniyam Tech events Calendar – https://kaniyam.com/events/

Introduction to PostgreSQL database – free online course in Tamil

Introduction to PostgreSQL database – free online course in Tamil

Monday, wednesday, Friday IST evening.

First class – 18-Nov-2024 7-8 PM IST

Syllabus: https://parottasalna.com/postgres-database-syllabus/

Trainer – Syed Jafer – contact.syedjafer@gmail.com

Get the meeting link here

Telegram Group – https://t.me/parottasalna
Whatsapp channel- https://whatsapp.com/channel/0029Vavu8mF2v1IpaPd9np0s Kaniyam Tech events Calendar – https://kaniyam.com/events/

Basic Linux Commands

Hi folks , welcome to my blog. Here we are going to see some basic and important commands of linux.

One of the most distinctive features of Linux is its command-line interface (CLI). Knowing a few basic commands can unlock many possibilities in Linux.
Essential Commands
Here are some fundamental commands to get you started:
ls - Lists files and directories in the current directory.

ls

cd - Changes to a different directory.

cd /home/user/Documents

pwd - Prints the current working directory.

pwd

cp - Copies files or directories.

cp file1.txt /home/user/backup/

mv - Moves or renames files or directories.

mv file1.txt file2.txt

rm - Removes files or directories.

rm file1.txt

mkdir - Creates a new directory.

mkdir new_folder

touch - Creates a new empty file.

touch newfile.txt

cat - Displays the contents of a file.

cat file1.txt

nano or vim - Opens a file in the text editor.

nano file1.txt

chmod - Changes file permissions.

chmod 755 file1.txt

ps - Displays active processes.

ps

kill - Terminates a process.

kill [PID]

Each command is powerful on its own, and combining them enables you to manage your files and system effectively.We can see more about some basics and interesting things about linux in further upcoming blogs which I will be posting.

Follow for more and happy learning :)

Linux basics for beginners

Introduction:
Linux is one of the most powerful and widely-used operating systems in the world, found everywhere from mobile devices to high-powered servers. Known for its stability, security, and open-source nature, Linux is an essential skill for anyone interested in IT, programming, or system administration.
In this blog , we are going to see What is linux and Why choose linux.

1) What is linux
Linux is an open-source operating system that was first introduced by Linus Torvalds in 1991. Built on a Unix-based foundation, Linux is community-driven, meaning anyone can view, modify, and contribute to its code. This collaborative approach has led to the creation of various Linux distributions, or "distros," each tailored to different types of users and use cases. Some of the most popular Linux distributions are:

  • Ubuntu: Known for its user-friendly interface, great for beginners.
  • Fedora: A cutting-edge distro with the latest software versions, popular with developers.
  • CentOS: Stable and widely used in enterprise environments. Each distribution may look and function slightly differently, but they all share the same core Linux features.

2) Why choose linux
Linux is favored for many reasons, including its:

  1. Stability: Linux is well-known for running smoothly without crashing, even in demanding environments.
  2. Security: Its open-source nature allows the community to detect and fix vulnerabilities quickly, making it highly secure.
  3. Customizability: Users have complete control to modify and customize their system.
  4. Performance: Linux is efficient, allowing it to run on a wide range of devices, from servers to small IoT devices.

Conclusion
Learning Linux basics is the first step to becoming proficient in an operating system that powers much of the digital world. We can see more about some basics and interesting things about linux in further upcoming blogs which I will be posting.

Follow for more and happy learning :)

Installing Arch Linux in UEFI systems(windows)

This will be a very basic overview in what is to be done for installing Arch Linux. For more information check out Arch wiki installation guide.

The commands shown in this guide will be in italian(font).

Step 1: Downloading the required files and applications

I have downloaded a few applications to help ease the process for the installation. You can download them using the links below.

Rufus:
This helps in formatting the USB and converting the disc image file to a dd image file. I have used rufus, you can use other tools too. This only works on windows.
rufus link

BitTorrent
The download option in the wiki page suggests we use BitTorrent for downloading the disc image file.
BitTorrent for windows

Arch Linux torrent file
This is for downloading the Arch Linux Torrent File. The download link can be found in the website given below.
Arch Linux Download Page

Step 2: The bootable USB

You will need a USB of size at least 2GB and 4GB or above should be very comfortable to use.

First open the BitTorrent application or the web based version and upload the magnet link or the torrent file to start downloading the disc image file.

Then to prepare the USB:

  1. Launch the application to make the bootable USB like rufus.

2.In the device section select your USB and remember all the data in the drive will be lost after the process.

3.In boot selection, choose the disc image file that was downloaded through torrent.

4.In the target system select UEFI as we are using a UEFI system.

5.In the partition scheme make sure GPT is selected.

6.In file system select fat32 and 4096 bytes as cluster size.

7.When you click ready it will present you with 2 options, select the dd image file which is not the default option.

After the process is done the USB will not be readable to windows, so there is no need to panic if you cannot access the USB.

If you are using a dual boot make sure you have at least 30 GB of unallocated space.

I would recommend to turn off bitlocker settings as it could give rise to other challenges during the installation.

Then get into the UEFI Firmware settings of your system. One easy way is to:
1.Hold shift key while pressing to restart the computer
2.Go into Troubleshoot
3.Go into Advanced Settings
4.Select UEFI Firmware Settings
5.You will have to restart again but you will be in the required place.

Turn off secure boot state. It is usually in the security settings.

Select save changes and exit.

When you log back into your system ensure that secure boot state is off by going into system information.

Go back to UEFI Firmware settings by repeating the process.

In the boot priority section, give your USB device the highest priority. This is usually in the boot section. Then select save changes and exit.

Step 3: Preparing Arch Linux Installation

When all the above steps are done and the system restarts, you will be prompted with a few options. Select Arch Linux install medium and press 'Enter' to enter the installation environment. After this you will need to follow a series of steps.

1. Verifying you are in UEFI mode.

To do that type the command
cat /sys/firmware/efi/fw_platform_size

You should get the result as 32 or 64. If you get no result then you may not be using UEFI mode.

2. Connecting to the internet:

If you are using an ethernet cable then you don't have to worry as you might already be connected to internet.
Use the command
ping -c 4 google.com
or another website to ping from to check if you're connected to the internet.

To connect to wi-fi, type in the command
ip link

This should show you all the internet devices you have. Your wi-fi should typically be wlan0 or something like wlp3s0, which is your device name.

Then type the command
iwctl

This should get you into an interactive command line interface.
You can explore the options by using the command
help

My device name was wlan0 so I'm using wlan0 in the command I'm going to show if yours is different make the appropriate changes.

To connect to the wifi use the command
station wlan0 connect "Network Name"
where "Network Name" is the name of your network.

If you want to know the name of your network before doing this you can try the command
station wlan0 get-networks

To get out of the environment simply use the command
exit

After you exit, you can verify your connection with
ping -c 4 google.com

If it doesn't work, try the command
ping -c 4 8.8.8.8

If the above also doesn't work, the problem may lie with your network.

However if the second option works for you, the fix would be to manually change the DNS server you're using.
To do that, run the command
nano /etc/systemd/resolved.conf

In this file if the DNS part is commented using a #, remove the # and replace it with a DNS server you desire. For eg: 8.8.8.8

ctrl + x to save and exit

Now try pinging a website such as google.com again to make sure you're properly connected to the internet.

3. Set the proper time

When you connect to the internet you should have the proper time. To check you can use the command
timedatectl

4. Create the partitions for Arch Linux

To check what partitions you have, use the command
lsblk

This will list the partitions you have. It will be in the format /dev/sda or /dev/nvme0n1 or something else. Mine was /dev/nvme0n1 so I'll be using the same in the commands below.

To make the partitions, use the command
fdisk /dev/nvme0n1

This should bring you to a separate command line interface.

It will give you an introduction on what to do.

Now we will create the partitions.
To create a partition, use the command
n

It will show you what you want to number your partition and the default option. Click enter as it will automatically take the default option if you don't enter any value. Let's say mine is 1.

It will show you what sector you want the partition to start from and the default option. Click enter.

Then it will ask you where you want the sectors to end: type
+1g

1g will allot 1 GB to the partition you just created.

Then create another partition in the same way, let's say mine is sector number 2 this time and finally instead of
+1g use +4g

This will allot 4 GB to the second partition you just created.

Create another partition and this time leave the last sector to default so it can have the remaining space. Let's say this partition is number 3.

partition 1 - EFI system partition
partition 2 - Linux SWAP partition
partition 3 - Linux root partition

5. Prepare the created partitions for Arch Linux installation

Here, we are going to format the memory in the chosen partitions and make them the appropriate file systems.

For the EFI partition:
mkfs.fat -F 32 /dev/nvme0n1p1

This converts the 1 GB partition into a fat32 file system.

For SWAP partition:
mkswap /dev/nvme0n1p2

This converts the 4 GB partition into something that can be used as virtual RAM.

For root partition:
mkfs.ext4 /dev/nvme0n1p3

This converts the root partition into a file system that is called ext4.

6. Mounting the partitions

This is for setting a reference point to the partitions we just created.

For the EFI partition:
mount --mkdir /dev/nvme0n1p1 /mnt/boot

For the root partition:
mount /dev/nvme0n1p3 /mnt

For the swap partition:
swapon /dev/nvme0n1p2

Step 3: The Arch Linux Installation

1. Updating the mirrorlist (optional)

The mirrorlist is a list of mirror servers from which packages can be downloaded. Choosing the right mirror server could get you higher download speeds.

This step isn't required as the mirror list is automatically updated when connected to the internet but if you would like to manually do it, its in the file
/etc/pacman.d/mirrorlist

2. Installing base Linux kernel and firmware

To do this, use the command
pacstrap -K /mnt base linux linux-firmware

Step 4: Configuring Arch Linux system

1. generating fstab

The fstab is the file system table. It contains information on each of the file partitions and storage devices. It also contains information on how they should be mounted during boot.

To do it, use the command:
genfstab -U /mnt >> /mnt/etc/fstab

2. Chroot

Chroot is short for change root. It is used to directly interact with the Arch Linux partitions from the live environment in the USB.

To do it, use the command:
arch-chroot /mnt

3. Time

The timezone has 2 parts the region and the city. I am from India so my region is Asia and the city is Kolkata. Change yours appropriately to your needs.

The command:
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

We can also set the time in hardware clock as UTC.
To do that:
hwclock --systohc

4. Installing some important tools

The system you have installed is a very basic system, so it doesn't have a lot of stuff. I'm recommending two very basic tools as they can be handy.

i) nano:
This is a text editor file so you can make changes to configuration files.
pacman -S nano

ii) iwd:
This is called iNet wireless daemon. I recommend this so that you can connect to wi-fi once you reboot to your actual arch system.
pacman -S iwd

5. Localization

This is for setting the keyboard layout and language. Go to the file /etc/locale.conf by using
nano /etc/locale.conf

I want to use the english language that is the default in most devices so for doing that you have to uncomment(remove the #) for the line that says
LANG=en_US.UTF-8

As there are a lot of lines you can search using ctrl+F.

Then ctrl+X to save and exit.

Then use the command
locale-gen

This command generates the locale you just uncommented.

6. Host and password

To create the host name, we should do it in the /etc/hostname file. Use
nano /etc/hostname

Then type in what your hostname would be.
ctrl + X to save and exit.

To set the password of your root user, use the command
passwd

7. Getting out of chroot and rebooting the system

To get out of chroot simply use
exit

Then to reboot the system use
reboot

Remove the installation medium(USB) as the device turns off.

Step 5: Enjoy Arch Linux

Arch Linux is one of the most minimal systems. So you can customize it to your liking. You can also install other desktop environments if you feel like it.

kanchilug – Monthly Meeting – Nov 10, 2024

Hi everyone,
KanchiLUG’s Monthly meet is scheduled as online meeting this week on Sunday, Nov 10, 2024 17:00 – 18:00 IST

Meeting link : https://meet.jit.si/KanchiLugMonthlyMeet

Can join with any browser or JitSi android app.
All the Discussions are in Tamil.

Talk Details

Talk 0:
Topic : Postgres Architecture
Description : In this talk, we will explore the architecture of postgres Duration : 30 mins
Name : Sethupandian
About : My name is Sethu and I work as a practice manager for an Insurance company in Canada. Back in India, I am from Salem. Completed my engineering in Electrical & Electronics, at Kongu Engineering College(2000-2004). Started my IT career in the year 2005 and worked in companies like Ramco Systems, Verizon, TCS, Cognizant before joining my current employer. I have always got an interest towards learning things that is fascinating. And through Payilagam and Muthu sir, I came to know about Kaniyam and KanchiLUG. I am happy to be part of this great initiative. I wish and hope I can contribute whatever possible from my side.

Talk 1:
Topic : Intro to GDB
Description : Based on my recent translation of Beej’s guide to Tamil on same. Duration : 20 mins
Name : Annamalai N
About : a GNU/Linux user interested in Embedded Systems. Final year engineering undergrad.

After Talks : Q&A, General discussion

About KanchiLUG : Kanchi Linux Users Group [ KanchiLUG ] has been spreading awareness on Free/Open Source Software (F/OSS) in
Kanchipuram since November 2006.

Anyone can join! (Entry is free)
Everyone is welcome
Feel free to share this to your friends

kanchilug – Monthly Meeting – Nov 10, 2024

Hi everyone,
KanchiLUG’s Monthly meet is scheduled as online meeting this week on Sunday, Nov 10, 2024 17:00 – 18:00 IST

Meeting link : https://meet.jit.si/KanchiLugMonthlyMeet

Can join with any browser or JitSi android app.
All the Discussions are in Tamil.

Talk Details

Talk 0:
Topic : Postgres Architecture
Description : In this talk, we will explore the architecture of postgres Duration : 30 mins
Name : Sethupandian
About : My name is Sethu and I work as a practice manager for an Insurance company in Canada. Back in India, I am from Salem. Completed my engineering in Electrical & Electronics, at Kongu Engineering College(2000-2004). Started my IT career in the year 2005 and worked in companies like Ramco Systems, Verizon, TCS, Cognizant before joining my current employer. I have always got an interest towards learning things that is fascinating. And through Payilagam and Muthu sir, I came to know about Kaniyam and KanchiLUG. I am happy to be part of this great initiative. I wish and hope I can contribute whatever possible from my side.

Talk 1:
Topic : Intro to GDB
Description : Based on my recent translation of Beej’s guide to Tamil on same. Duration : 20 mins
Name : Annamalai N
About : a GNU/Linux user interested in Embedded Systems. Final year engineering undergrad.

After Talks : Q&A, General discussion

About KanchiLUG : Kanchi Linux Users Group [ KanchiLUG ] has been spreading awareness on Free/Open Source Software (F/OSS) in
Kanchipuram since November 2006.

Anyone can join! (Entry is free)
Everyone is welcome
Feel free to share this to your friends

How to create Servlet and Deploy on Apache Tomcat 10.1 in Linux

I am going to explain about how to create servlet and Deploy on Apache Tomcat Server 10.1 manually in any Linux distributions.

Directory Structure should be represented as below

directory structure to run servlets

You can keep ‘aaavvv’ folder as any name you want.

How to create Servlet on Apache Tomcat 10 in Linux

Step:1

Create a folder in /usr/share/tomcat10/webapps folder , In that folder create any folder name as you like, I create ‘myapps’ folder name as example.

cd /usr/share/tomcat10/webapps/;sudo mkdir myapps

Step:2

Go into myapps , then create ‘WEB-INF’ directory

cd myapps;sudo mkdir WEB-INF

Step:3

Go into WEB-INF, then create ‘classes’ directory

cd WEB-INF;sudo mkdir classes

Step:4

Go into classes directory, and create java file named ‘TeamTesters.java’ for this example, you can create any name you want.

cd classes;sudo nano TeamTesters.java

code for TeamTesters.java

Step:5

Run java program using javac command

sudo javac TeamTesters.java -cp /usr/share/tomcat10/lib/servlet-api.jar

here -cp represents classpath to run the program

Step:6

Go to backward directory (i.e., WEB-INF) and copy the web.xml file from ROOT directory present in the webapps folder present in tomcat10 folder

cd ..;sudo cp ../../ROOT/WEB-INF/web.xml web.xml;

Then edit web.xml file by adding <servlet> and <servlet-mapping> tag inside <web-app> tag

sudo nano web.xml

<servlet> and <servlet-mapping> in web.xml file

Step:9

Goto backward directory , (i.e., aaavvv) then create index.html file

cd ..; sudo nano index.html

content in index.html

Step:10

goto browser and type,

http://localhost:8080/myapps

servlet running on browser
Statement printed on html page declared in java

Common Troubleshooting problems:

  1. make sure tomcat server and java latest version is installed on your system .
  2. check systemctl or service status in your Linux system to ensure that tomcat server is running.

Automate this stuff…

If you wanted to automate this stuff… checkout my github repository

GitHub - vishnumur777/ServletCreationJava


How to create Servlet and Deploy on Apache Tomcat 10.1 in Linux was originally published in Towards Dev on Medium, where people are continuing the conversation by highlighting and responding to this story.

A simple design calculator on linux command line

when we open terminal or Konsole in Linux we used to think by using many utilities why calculators was not there interactively in it ?

Now here is the solution for it just by cloning a repository from GitHub on your PC. Here is the GitHub link to clone it.

Just open your terminal and make a directory for safety purpose for that type,

mkdir calculator;cd calculator

creating directory on my home directory and changing it to calculator

the above command explain about making and changing directory from home directory.

then type,

git clone https://github.com/vishnumur777/simplecalculatorbash

cloning repository through git command

this command will clone all the files present in the repository.

but please make sure that you have installed git on your PC.

Then change directory to simplecalculatorbash using

cd simplecalculatorbash/

changing directory to simplecalculatorbash

then type,

chmod +x calci.sh

modifying permissions to executables

this command changes the permission to run on user without depending on root . So that many PC cause this error that permission was denied while executing the file.

For execution run type,

./calci.sh

command to execute simplecalculator

and press enter key

which will run very colourful calculator interactive prompt by installing dependencies which I posted on GitHub.

calculator performing addition of two numbers interactively

How to view manually installed packages in ubuntu

Hi all in the blog post we are going to list down the packages we installed manually.

why we need that information?
when we set up a fresh Linux Distro or migrate existing or converting Linux installation into a docker image that will very helpful to us

how we are going to get this thing done?
using the aptitude (high-level package manager command-line interface)

install aptitude first if not present in your system

sudo apt install aptitude 

wait a few seconds to complete installation after completing the installation run the following command to find the manually installed packages after the initial run of the

comm -23 <(aptitude search '~i !~M' -F '%p' | sed "s/ *$//" | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Image description

Voila we did it!

Ubuntu : SSDல் உபுண்டு 20.04 LTS டூயல் பூட் முறையில் விண்டோசுடன் நிறுவுதல்

அக் 31, 2024

அண்மையில் நான் டூயல் பூட் முறையில் விண்டோசுடன் நிறுவிய அனுபவத்தினை இந்த பதிவில் காணலாம்.

நான் SSDல் விண்டோஸ் இயங்குதளம் பயன்படுத்திவருகிறேன். என்னுடைய இன்னொரு HDDல் உபுன்டு இயங்குதளம் வைத்திருக்கிறேன். அந்த வன்வட்டு பழுதடையும் தருவாயில் இருப்பதால் SSDல் உபுண்டு இயங்குதளம் நிறுவ தயாரானேன்.

எப்பொழுதும் புதிய இயங்குதளம் நிறுவ தாயராகும் போது காப்பு பிரதி(Backup) எடுத்துவைத்து தயாராகவும்.

குறிப்பு : நான் இயங்குதளம் 3 முறை நிறுவியுள்ள அனுபவத்தில் காப்பு பிரதி எடுக்காமல் தொடங்கினேன். ஆனால் இவ்வாறு செய்வது பரிந்துரைக்கபடவில்லை.

நான் லைவ் USB ventoy எனும் மென்பொருளின் உதவியுடன் தயார் செய்தேன்.

References :

Setting UP ubuntu’s GRUB as primary bootloader using efibootmgr https://superuser.com/questions/1247300/how-to-make-uefi-bios-start-grub-not-windows

One day One Command(CLI)

Day 1: pwd
1.pwd: This command stands for Print Working Directory. As the name suggests it helps us know the current/working directory.
Syntax: pwd
1 a.pwd -P: Stands for pwd physical. It returns the current physical directory ignoring all the symbolic links in the path.
Syntax: pwd -P
1 b.pwd -L: Stands for pwd logical. It returns the current logical directory completely preserving the symbolic links in the path.
Syntax: pwd -L

Day 2: poweroff

$ sudo poweroff The poweroff command shuts down the system safely and immediately terminating all processes where unsaved work could be lost. It also unmounts all file systems then powers off the hardware. It is a quick way to turn off the system safely. Users in most cases cannot operate this command without sudo.
$ sudo poweroff --force This command shuts the down the system immediately without terminating any processes. It is generally unsafe to do so. It could be used if the system is unresponsive.
$ sudo poweroff --halt This command works just the way poweroff works but it does not finally cut the power to the hardware systems. It could be used if you want to terminate all the current running processes.

Day 3: ls

  1. ls: The ls command stands for list and it is used to list the files and directories. If used simply without any context it lists the files and directories in the current working directory. It can also be used to list files in other directories by following it up with the path to the directory. To list the files and directories of a file that requires root access we can use sudo on which otherwise we get permission denied. Syntax:ls ls /path/of/directory sudo ls /path/of/restricted directory 3 a.ls -l: This command does the same as ls files with more details. It gives more details such as permissions, ownership, size, date last modified, etc. Syntax:ls -l 3 b.ls -a:This command like the ls file also shows files and directories including hidden ones. Those files usually start with a '.'. Syntax:ls -a 3 c.ls -lh:It is just like ls -l but is in a more human readable format. The sizes are mentioned in kb,mb, etc.

Day 4: cat

  1. cat: This command stand for concatenate. When used on a file it shows the content of the file. If used on executable files or on files containing images they usually return garbled text and symbols as it is interpreting binary data. This command can also copy the content of a file and append it to another file. cat file1 >> file2 appends the contents of file1 to file2. It can also combine two files and copy it to another file. cat file1 file2 > newfile combines the contents of file1 and file2 in newfile. Syntax: cat filename cat file1 >> file2 cat file1 file2 > newfile 4 a.cat -n: This command does the same as cat and numbers all the lines in the output. Syntax: cat -n filename 4 b.cat -b: This command does the same as cat -n but it doesn't number the blank lines. Syntax: cat -b filename 4 c.cat -s: This command does the same as the cat command but it suppresses repeated blank lines into only one blank line. Syntax: cat -s filename 4 d.cat -T: This command does the same as cat but show tabs as ^I helping us differentiate between tabs and spaces. Syntax: cat -T filename 4 e.cat -E: This command is similar to cat -n and instead of numbering all the lines it leaves the $ symbol at the end of a line to help us distinguish between the end of a line or if they just continue. Syntax: cat -E filename 4 f.cat -A: This command is a combination of cat -E and cat -T where it shows the end of each line by leaving a $ symbol and helps distinguishing spaces from tabs by replacing tabs with ^I. Syntax: cat -A filename

Some of these options can be used together.
For eg: cat -ns numbers the lines from start and shortens the repeated blank lines to just one and the numbering is done on the remaining blank line. cat -ET does the same as cat -A. cat -bE numbers only the non blank lines leaves a $ symbol at the end of a line, etc.

Day 5: echo

  1. echo: The echo command sends a message or a variable to all active users or can be used to create or overwrite files. Syntax: echo "Hi everyone" echo $HOME echo "the text" > filename.extension

5 a.echo -e: This command works the same way as echo does but it takes in escape sequences as well. For eg: \n,\t,etc.
Syntax: echo -e "First Line\nNext Line"

Day 6: head and tail

=====================================

I'm sorry to have missed yesterday. So today I will be doing 2 commands.

=====================================

  1. head: It displays the first few lines of a file it is used with. The default number of lines it shows is 10. If used on a file containing binary data it outputs garbled texts and symbols. When used on multiple files it will display each file with a file header.

Syntax: head file.extension
head file1.txt file2.txt

=====================================

6 a. head -n: It behaves the same as head but instead of the default number of lines, it displays the number of lines mentioned. If the mentioned number exceeds the data in the particular file then it displays all of the file without any errors. If this command is used on multiple files it outputs the number of lines in each of the files.

Syntax: head -n file.extenstion
head -n 5 file.txt

=====================================

6 b. head -c: It behaves similar to head -n but instead of the lines it takes number of bytes which the user has mentioned. Similarly, it displays the entire file if the number of bytes mentioned is more than what is available without any errors.

Syntax: head -c file.extension
head -c 25 abc.txt

=====================================

The commands after this may not work for non GNU systems.

=====================================

6 c. head -q: When this is used on multiple files it suppresses the file headers. It can also be used in combination with head -c or head -n.

Syntax: head -q file1.txt file2.txt
head -q -n 2 file1.txt file2.txt

=====================================

6 d. head -v: When this is used even on a single file then the file headers are displayed. If used together with head -q, head -v has the higher priority in whatever order it is done. So head -q -v or head -v -q will always display the headers.

Syntax: head -v file.txt

=====================================

  1. tail: This command is similar to head command with the only difference being it displays the last few lines.

Syntax: tail file.txt

=====================================

7 a. tail -n: This like the tail command instead of the last default number of lines we can specify the number of lines we want.

Syntax: tail -n file.txt

=====================================

7 b. tail -c: This command outputs the last number of specified bytes of the file.

Syntax: tail -c file.txt

=====================================

The commands after this may not work on non GNU systems.

=====================================

7 c. tail -f: This command works similar to the tail command, at the beginning it only displays the last 10 lines but it will continue to give more outputs as the file grows. This can be useful for growing log files. If data is overwritten instead of appended to the said file, tail -f may not work properly.

Syntax: tail -f file.extension

=====================================

7 d. tail -F: This is just a better version of tail -f. If it encounters any errors such as the file is temporarily deleted or being overwritten it retries and when the file is available again, it starts the process again.

Syntax: tail -F file.extension

=====================================

7 d i. tail -F/f --max-unchanged-stats: As tail -F keeps on checking the file indefinitely, it can be stopped using this command. We can issue the number of times tail -F can retry and if there is constantly no updates in the file it will stop retrying.

Syntax: tail -F --max-unchanged-state=5 file.extenstion

=====================================

7 d ii. tail -F/f --pid: This command is the same as tail -F but it stops retrying after a specific process ends.

Syntax: tail -F --pid= file.extension
tail -F --pid==123 logfile.txt

=====================================

7 e. tail -q: This suppresses the file headers if multiple files are used.

Syntax: tail -q file1.extension1 file2.extension2

=====================================

7 f. tail -v: This forces the file headers in the output even if only one file is used.

Syntax: tail -v file.extension

*************************************

Day 7: grep

=====================================

  1. grep: This command is used to look for a given pattern in a files or output lines.

Syntax: grep "pattern" filename

=====================================

8 a. grep -i: This command works the same way as grep but it is case insensitive.

Syntax: grep -i "PaTtern" filename

=====================================

8 b. grep -r: This command searches for the given pattern recursively completely in a given directory. It searches every file or director that is contained in the given directory and gives its results.

Syntax: grep -r "pattern" filename

=====================================

8 c. grep -n: This command does the same as the grep command but it also numbers the output lines.

Syntax: grep -n "pattern" filename

Fish Shell:[TBD]

The Fish shell (short for Friendly Interactive Shell) is a Unix shell that is designed to be user-friendly, interactive, and feature-rich. It’s an alternative to more traditional shells like Bash or Zsh, and it comes with several features that aim to improve the command-line experience. Here’s a brief overview:

Key Features of Fish Shell:

  1. Autosuggestions: Fish provides real-time, context-aware command suggestions as you type, helping you to quickly complete commands based on your history and available commands.
  2. Syntax Highlighting: Fish highlights the syntax of your commands as you type, making it easier to spot errors before you run a command.
  3. Smart Tab Completions: The shell offers intelligent tab completions for commands, options, and file paths, often providing descriptions for each option.
  4. User-Friendly Scripting: Fish scripts are more readable and easier to write than those in other shells due to its simplified syntax.
  5. Web-Based Configuration: Fish includes a web-based configuration tool accessible via the command fish_config. This tool allows users to configure prompts, functions, variables, and more through a web interface.
  6. No Configuration Needed: Fish works out-of-the-box without needing configuration files like .bashrc or .zshrc, although it does allow custom configurations if desired.
  7. Universal Variables: Variables in Fish can be scoped universally (across all sessions) or locally (to the current session), allowing for flexible environment management.

Installing Fish Shell:

  • On Debian/Ubuntu: sudo apt-get install fish
  • On Fedora: sudo dnf install fish
  • On macOS (via Homebrew): brew install fish

Switching to Fish:

After installation, you can switch to Fish temporarily by typing fish in your current shell. To make Fish your default shell, use the following command:

chsh -s /usr/bin/fish

Configuration:

You can start configuring Fish by running the following command:

fish_config

This opens a web interface in your default browser where you can customize your prompt, functions, and other settings.

Fish is highly regarded for its user-centric approach, making it a popular choice among developers and command-line enthusiasts.

Commands:

  1. dirh:
    • Description: This command displays the directory history in Fish, showing the list of directories you have visited during your shell session.
    • Usage: Typing dirh will give you a list of directories you have navigated to using cd.
  2. prevd:
    • Description: This command allows you to go back to the previous directory in your history.
    • Usage: Simply type prevd to move to the last directory you were in. It’s an alternative to using cd -.
  3. nextd:
    • Description: This command is used to move forward to the next directory in the directory history.
    • Usage: Type nextd to return to a directory you previously visited after using prevd.
  4. cdh:
    • Description: The cdh command in Fish is shorthand for “change directory history.” It allows you to quickly change to a directory from your history by its index.
    • Usage: Running cdh N (where N is the index number) will take you directly to that directory in your history.
  5. math:
    • Description: The math command allows you to perform mathematical operations directly in the shell.
    • Usage: For example, math "5 + 10 * 2" will output 25. It’s useful for quick calculations without leaving the shell.


Key Bindings:

  1. Ctrl+F:
    • Description: This key binding moves the cursor forward one character in the command line.
    • Usage: Use it to navigate through your command without deleting anything.
  2. Ctrl+U:
    • Description: This command clears the text from the cursor to the beginning of the line.
    • Usage: If you’ve typed a long command and want to quickly erase everything before the cursor, Ctrl+U will do that.
  3. Alt+F:
    • Description: Moves the cursor forward one word at a time in the command line.
    • Usage: Use it to quickly skip over words when editing a command.
  4. Alt+← (Alt + Left Arrow):
    • Description: This moves the cursor to the beginning of the previous word.
    • Usage: Similar to Alt+F, but in the opposite direction, allowing you to move backward one word at a time.
  5. Alt+→ (Alt + Right Arrow):
    • Description: Moves the cursor to the end of the current or next word.
    • Usage: Use it to quickly move the cursor forward to the end of a word.
  6. Shift+→ (Shift + Right Arrow):
    • Description: This key binding selects text from the current cursor position to the right, one character at a time.
    • Usage: Helpful for selecting text in a command to cut, copy, or replace.
  7. Shift+← (Shift + Left Arrow):
    • Description: Selects text from the current cursor position to the left, one character at a time.
    • Usage: Like Shift+→, but for selecting text to the left.
  8. Ctrl+W:
    • Description: Deletes the word before the cursor.
    • Usage: If you make a mistake and want to remove the last word quickly, Ctrl+W will do it.
  9. Alt+L:
    • Description: Lowercases the word from the cursor to the end of the word.
    • Usage: If you’ve accidentally typed something in uppercase and want to quickly convert it, use Alt+L.
  10. Alt+H:
    • Description: This brings up the help documentation in Fish, typically in the form of a web page.
    • Usage: Use Alt+H if you need quick access to Fish shell help.
  11. Alt+P:
    • Description: Moves back through your command history, searching for a command that matches what you’ve typed so far.
    • Usage: Useful for finding and reusing previous commands.
  12. Alt+S:
    • Description: This key binding toggles sorting of suggestions in the Fish shell.
    • Usage: Use it when you want to change how Fish autocompletion suggestions are presented (alphabetical vs. frequency-based, for example).

Understanding the Commands and Key Bindings in Context:

  • Navigation: Commands like dirh, prevd, nextd, and cdh help you efficiently navigate through your directory history, making it easier to move between frequently used folders without typing out the full path.
  • Editing: Key bindings like Ctrl+F, Ctrl+U, Alt+F, Alt+←, Alt+→, and Ctrl+W allow you to quickly and effectively edit commands in the shell. They are essential for efficient command-line work, allowing you to correct errors and move through your command line swiftly.
  • Selection and Text Manipulation: The Shift + arrow key bindings and Alt+L help you select and manipulate text within the command line, which is useful when dealing with complex commands.
  • Utility: Ctrl+W, Alt+P, and Alt+S offer utility functions like deleting words, searching history, and toggling sorting modes for completions.

These tools and shortcuts can greatly enhance your productivity and command-line efficiency in the Fish shell.


In the context of command-line environments like the Fish shell, “I,” “N,” and “V” are not directly applicable as modes (unlike in text editors like Vim). However, if you’re referring to modes in a text editor like Vim or a Vim-like environment, here’s a breakdown of what these modes represent:

Vim Modes Overview:

Vim, a powerful text editor, operates in different modes that dictate how you interact with text. The primary modes are:

  1. Normal Mode (N):
    • Description: This is the default mode when you open Vim. In Normal mode, you can navigate through text, delete text, copy and paste, and perform various other text manipulations.
    • Key Actions:
      • h, j, k, l: Move the cursor left, down, up, and right, respectively.
      • dd: Delete the current line.
      • yy: Yank (copy) the current line.
      • p: Paste the yanked text after the cursor.
      • u: Undo the last action.
    • How to Enter: Press Esc if you’re in another mode to return to Normal mode.
  2. Insert Mode (I):
    • Description: In Insert mode, you can insert text into the document. This mode is similar to typing in a regular text editor.
    • Key Actions:
      • i: Enter Insert mode before the cursor.
      • I: Enter Insert mode at the beginning of the current line.
      • a: Enter Insert mode after the cursor.
      • A: Enter Insert mode at the end of the current line.
      • o: Open a new line below the current line and enter Insert mode.
      • O: Open a new line above the current line and enter Insert mode.
    • How to Enter: Press i, I, a, A, o, or O from Normal mode.
  3. Visual Mode (V):
    • Description: Visual mode allows you to select text, which can then be manipulated (copied, deleted, replaced, etc.).
    • Key Actions:
      • v: Enter Visual mode, where you can select text character by character.
      • V: Enter Visual Line mode, which selects entire lines.
      • Ctrl+v: Enter Visual Block mode, allowing you to select a rectangular block of text.
      • y: Yank (copy) the selected text.
      • d: Delete the selected text.
      • >, <: Indent or un-indent the selected text.
    • How to Enter: Press v for character-wise selection, V for line-wise selection, or Ctrl+v for block-wise selection.

How These Modes Relate in a Shell Environment:

While the Fish shell doesn’t have “modes” in the same sense as Vim, understanding Vim’s modes can be beneficial when using text editors within the shell or using tools like vi, vim, or nano directly from the terminal.

Practical Example in Vim:

Imagine you are editing a file in Vim:

  • Normal Mode (N): You start in Normal mode. You can navigate through your text without altering it. If you want to move to a specific line, you might press gg to go to the beginning or G to go to the end of the document.
  • Insert Mode (I): To begin editing text, you would press i to enter Insert mode. Now you can type as usual.
  • Visual Mode (V): If you need to copy or delete a block of text, you’d enter Visual mode by pressing v or V, select the text, and then perform the action (e.g., y to copy or d to delete).

Understanding these modes helps you effectively navigate and edit text in Vim, which is a common tool used in Unix-like environments, often accessed via a shell like Fish.

kanchilug Weekly Discussion – Oct 20 2024

Hi everyone,
This week in KanchiLUG we have scheduled an weekly discussion as online meeting on Sunday, Oct 20, 2024 17:00 – 18:00 IST

Meeting link : https://meet.jit.si/KanchiLugWeeklyDiscussion

We also hava talk scheduled as well

Talk Details:
Talk 0:
Topic: Introduction to open-tamil python library
Duration: 30 mins
Speaker: Shrinivasan T
About speaker: A Linux Lover. Editor of free software magazine in Tamil http://kaniyam.com
Ebooks Publisher at http://FreeTamilEbooks.com
Founder – Kaniyam Foundation

Weekly discussion is an open and friendly discussion where topics related to Linux/FOSS technologies will be discussed. We will meet in the online jitsi meeting and discuss new linux things everyone explored this week and we chat about linux news and topics. If you are facing any issues with linux or any FOSS applications, you can also share your issues during the discussion. Our KanchiLUG community will help to debug or suggest some good alternatives.

Can join with any browser or JitSi android app.
All the Discussions are in Tamil.

About KanchiLUG : Kanchi Linux Users Group [ KanchiLUG ] has been spreading awareness on Free/Open Source Software (F/OSS) in Kanchipuram since November 2006.

Anyone can join! (Entry is free)
Everyone is welcome
Feel free to share this to your friends

Why I like IRC – Internet Relay Chat – even in 2020?

IRC – Internet Relay Chat – is a text based chat program. The 2k kids may compare this to slack, telegram chat, whatapp chat or any other instant messaging.

IRC was created by Jarkko Oikarinen in August 1988. Wow. Too old, Right?

Why it is not famous nowadays? People are telling that there are many cons compared to modern instant messaging.

These cons are real Pros of IRC. They are not bugs. They are the intended features.

Are you hearing the word IRC for the first time? Here is a quick beginners guide

https://www.whoishostingthis.com/resources/irc-primer/

IRC is only Text Based Chat.

Yes. You can not add any image or video. Few servers accept file uploads. Still Text is the only preferred way of communication in IRC. Why?

  • Plain Text is the God of content, always.
  • It is searchable.
  • Anyone can read faster
  • Watching a one hour video will talk one hour time. Reading its transcription will take quarter of its time.
  • On server side maintenance, it will be great headache to keep on adding the storage to keep all the images, files, videos. Ask the admins, who manages RocketChat, Mattermost, Mastodon Instances. They will tell the pains of keep on increasing the hard disk spaces. The IRC server admins will live a peacefull life and can keep the history for decades.
  • If you can not explain anything on text, even videos wont help for many.

IRC is not keeping the history of chats

IRC simulates the realtime chatroom like a meeting room. If you are late to a meeting room, you miss the spoken things. You can read minutes and know what was spoken.

Similarly, IRC is only realtime chat. You can not read the previous chats like you do in telegram like instant messengers. Even in modern we dont read all the history of chats. Imagine, in a morning, a chat room having 200 unread message. What do you do? Just skip all the messages and mark them read. Thats life. IRC knew this 30 ago.

What If I want history?

As all the interaction is happening as plain text, anyone can share the chat history online as blogpost, pastebin or github gist. Ask any fellow mates to export them and read in leisure.

That’s too much work for me to ask for a chat history

Well. There are bots and bots and bots for IRC. Check for any logging bot and add to your channel. Host the bot yourself or use this bot.   https://ircbot.comm-central.org:8080/  Add this bot to your channel and read all the chatlog on their website.

Who are using IRC still?

Most of the Free/Open Source software are having IRC Channels to provide free support. You can interact with the original developers of the software there. Anyone can create a channel, invite friends, hangout and have fun there.

Rules, Rules, Rules

It seems there are few rules to chat in IRC Channels. It depends on each channel. To maintain  goodness, there are rules everywhere. Even in Roads, to avoid accidents, we have to follow rules. There are mailing list rules. Similarly, there are common IRC Rules. Read here for common IRC meeting Rules https://fedoraproject.org/wiki/How_to_use_IRC#Meeting_Protocol

There are many commands to learn

Yes. As everything is via only text, we have to give few commands to use the IRC. There are no “Join/Mute/Leave/Kick” buttons. They are just commands. Check your instant messenger GUI. You will be clicking so many buttons to interact. They are the original commands here.

I have to remember people by there NickName. Why cant we connect with their phone number?

Welcome to the world of Privacy. By giving all your contact’s phone numbers to your instant messenger like WhatsApp, you are selling all our privacy. Do you get frequent SPAM phone calls from all banks,credit cards? We did not get these on IRC times. IRC keeps all your privacy. You dont have to reveal your name, sex, country.

What if I want to chat with someone instantly? He is not there in the IRC Channel? In instant messenger, I leave him a message, on next day, he will see and reply.

IRC respects your offline life. You dont need to be online 24/7. IRC is like going to office and being in a meeting room. Are you in meeting room or a tea shop gang or friends gathering 24/7 ? How are you connecting with them when they are not around? Yes. You make calls or send a message. You choose another medium to connect with them and wait. Do the same here. If you have some query. Posted in IRC. No one replies or the persons who can reply are not there in the Channel. Then ask the same on respective mailing list or stackoverflow like forums. Check the IRC logs next day, you might got answers. You can quickly search over text to get your conversations.

If someone is not there online, it seems he is enjoying life in realtime. Let them enjoy it. Ask for their available time and interact only on that time.

Meet.Jit.si, BigBlueButton,Zoom, Skype, Facebook Live, YouTube Live are useful to meet people, discuss and for any training. Can we do the same on IRC?

Yes. We can do all the things in IRC too. There are tons and tons of training happening over IRC. DPGLug is conducting Training on Free Software from 2009 on every summer. You can read all the logs here https://dgplug.org/irclogs/

We had monthly IRC meetings on Tamil Computing around 2015. You can read all the logs here  https://tamilirc.wordpress.com/

Anyone can read/skim these logs quickly. If I share a youtube channel or podcasts full of 100s of hours of content, how long will you watch? It depends on the need. The same applies for IRC also. But it easy and quick to read text.

Can I use IRC on the go with Mobile?

Yes. There are many mobile clients. IRCCloud’s web client and mobile client are modern and neat. I use their free plan. There are tons of clients available for all OS. Explore and find your lovable pair, yourself.

What if I want to read all the history?

You can setup IRC bouncer software like ZNC, or connect with a matrix channel or pay for IRCCloud.com like services. https://thelounge.chat/ seems a better self hostable IRC web client. Install it in a server or raspberry pi. If you want to be away from propitiatory software, for which you are the product, you have to host yourself or pay to some service providers. Or simply enable a free logging bot and read from their website.

I can talk faster than typing.

But people can read faster than hearing or seeing any video. If you want to reach more people, type the content in IRC or a blog post.

What about Matrix/Riot?

Matrix/Riot.im seems a upgraded IRC with all the bells and whistles of other instant messengers. They can be connected with IRC using bots. To and Fro both way communications are seamless. But it allows multimedia content, exporting all the content for public view is still tough, high maintenance tasks for server admins.

Want to discuss with 1000s of people same time? Use IRC

All the modern video chat services, YouTube, Facebook Live sessions take high bandwidth. Not everyone on the world have the bandwidth to connect with a video chat. Most of the video calls are spending time with “Am I audible? Do you see my screen? I can not see the screen. Stop the Noice” etc like discussions.

We dont have a 100s of people participating free video call service yet. You have to pay a lot for Zoom like services, just to hear the above voices and see blur faces of participants.

Instead, call for a meeting over IRC. Follow few meeting guidelines and all the meeting is done with low noise. Even anyone can connect with 2G or below bandwidth network.

Ok.Ok.Ok Stop this marketing for IRC

Few final thoughts.

  1. IRC server is self hostable. irc.libera.chat, irc.oftc.net are few major free servers available to create a channel
  2. Respect other people’s time. Video calls take all the participants time. Text chats are quick and respecting time.
  3. Text chat is very minimalist. Enjoy the peacefulness of a IRC meeting.
  4. Not all trainings need a video chat. If something is really important to demonstrate as a video, record a screencast, upload online and ask all to watch.
  5. Text is great way to learn things. Remember, we still use text books, tutorials, documentation, wikipedia to learn many things. Videos can help only as supporting materials.

I will be available at #ilugc and #kaniyam at irc.libera.chat on weekdays on daytimes.

I will plan for few text based training on any free software and announce here soon.

Thanks to ShakthiKannan, Mohan of Indian Linux Users Group, Chennai and Kushal of DGPLug for inspiring me on using IRC.

Add your comments or experience with IRC here.

kanchilug Weekly Discussion – Oct 20 2024

Hi everyone,
This week in KanchiLUG we have scheduled an weekly discussion as online meeting on Sunday, Oct 20, 2024 17:00 – 18:00 IST

Meeting link : https://meet.jit.si/KanchiLugWeeklyDiscussion

We also hava talk scheduled as well

Talk Details:
Talk 0:
Topic: Introduction to open-tamil python library
Duration: 30 mins
Speaker: Shrinivasan T
About speaker: A Linux Lover. Editor of free software magazine in Tamil http://kaniyam.com
Ebooks Publisher at http://FreeTamilEbooks.com
Founder – Kaniyam Foundation

Weekly discussion is an open and friendly discussion where topics related to Linux/FOSS technologies will be discussed. We will meet in the online jitsi meeting and discuss new linux things everyone explored this week and we chat about linux news and topics. If you are facing any issues with linux or any FOSS applications, you can also share your issues during the discussion. Our KanchiLUG community will help to debug or suggest some good alternatives.

Can join with any browser or JitSi android app.
All the Discussions are in Tamil.

About KanchiLUG : Kanchi Linux Users Group [ KanchiLUG ] has been spreading awareness on Free/Open Source Software (F/OSS) in Kanchipuram since November 2006.

Anyone can join! (Entry is free)
Everyone is welcome
Feel free to share this to your friends

Kanchilug Monthly Meet – Oct ,13 2024

Lightning Talk by Krishna

Topic : Desktop Customization : picom, pywal

Resource : Krishna S

SSD File System Comparison : https://www.linux.org/threads/comparison-of-file-systems-for-an-ssd.28780/

https://etherpad.wikimedia.org/p/KanchiLUGMMOct13

Notes on Choosing HDD to SSD Linux Installation migration

Chat GPT Prompt : how to backup current linux installation configuration files and packages list as a archive and apply on a new installation

Result

Backing up your current Linux installation’s configuration files and package lists is a great way to ensure you can easily restore or replicate your setup on a new installation. Here’s how you can do it:

Step 1: Backup Configuration Files

  1. Identify Configuration Files: Most configuration files are located in /etc. You may also have application-specific configurations in your home directory (like .bashrc, .vimrc, etc.).
  2. Create an Archive:
    You can create a compressed archive (like a tarball) of your configuration files. Run the following command:
   sudo tar -czvf config_backup.tar.gz /etc /home/your_username/.bashrc /home/your_username/.vimrc

Adjust the paths based on what configuration files you want to back up.

Step 2: Backup Installed Packages List

The method to back up the installed package list depends on your Linux distribution.

For Debian-based systems (like Ubuntu):

  1. Backup Installed Packages:
   dpkg --get-selections > package_list.txt
  1. Backup Sources List:
   sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

For Red Hat-based systems (like Fedora, CentOS):

  1. Backup Installed Packages:
   rpm -qa > package_list.txt
  1. Backup Repositories:
   sudo cp -r /etc/yum.repos.d/ /path/to/backup/repo_backup/

Step 3: Create a Complete Backup Archive

Combine everything into one archive:

tar -czvf full_backup.tar.gz config_backup.tar.gz package_list.txt /etc/apt/sources.list.backup

Step 4: Restore on a New Installation

  1. Transfer the Backup: Copy the full_backup.tar.gz to your new installation.
  2. Extract the Backup:
   tar -xzvf full_backup.tar.gz
  1. Restore Configuration Files:
   sudo tar -xzvf config_backup.tar.gz -C /
  1. Restore Package List: For Debian-based systems:
   sudo dpkg --set-selections < package_list.txt
   sudo apt-get dselect-upgrade

#### For Red Hat-based systems:
You can reinstall packages from the list:

   xargs -a package_list.txt sudo dnf install -y
  1. Restore Sources List (Debian-based):
   sudo cp /etc/apt/sources.list.backup /etc/apt/sources.list
   sudo apt update

Step 5: Finalize and Reboot

After restoring everything, it’s a good idea to reboot your system to ensure all configurations take effect.

Notes:

  • Make sure to review any new configurations or installed packages after the restoration, as dependencies and versions may vary.
  • For user-specific configurations, you may want to back up the entire home directory or specific application directories.

This process should help you smoothly transition to a new Linux installation with your desired configurations and packages!

Chat GPT Prompt : I am in a plan of migrating linux os to a new file system which is xfs or zfs brtfs which on is good

Choosing between XFS, ZFS, and Btrfs depends on your specific needs and use cases. Here’s a breakdown of each file system’s strengths and considerations to help you decide:

XFS

Pros:

  • Performance: Excellent performance, especially for large files and high-performance workloads.
  • Scalability: Designed for scalability, making it suitable for high-capacity storage systems.
  • Mature: A well-established file system with a long history of stability.

Cons:

  • Features: Lacks some advanced features like snapshots and built-in RAID compared to ZFS and Btrfs.
  • Management: Does not have as many management tools as ZFS.

ZFS

Pros:

  • Data Integrity: Strong focus on data integrity with built-in checksumming.
  • Snapshots and Clones: Supports efficient snapshots and clones, allowing for easy backups and recovery.
  • Compression: Offers built-in compression options, which can save space.
  • RAID: Supports various RAID levels natively (ZRAID), enhancing redundancy.

Cons:

  • Memory Usage: Can require more RAM for optimal performance.
  • Complexity: More complex to set up and manage compared to traditional file systems.

Btrfs

Pros:

  • Snapshots and Subvolumes: Supports snapshots and subvolumes, making it flexible for backups and system management.
  • Built-in RAID: Offers support for multiple RAID levels.
  • Compression and Deduplication: Supports on-the-fly compression and deduplication.

Cons:

  • Stability: Still considered less mature than XFS and ZFS; while it has improved significantly, it may not be as stable for all workloads.
  • Performance: Can have variable performance depending on the workload and configuration.

Recommendations

  • For General Use: If you want stability and performance for general workloads, XFS is a great choice.
  • For Data Integrity and Advanced Features: If data integrity, snapshots, and advanced features are critical, ZFS is likely the best option.
  • For Flexibility and Modern Features: If you want modern features like snapshots and subvolumes with some flexibility, consider Btrfs.

Final Thoughts

Evaluate your specific use cases (e.g., data integrity, performance, ease of management) and the resources available on your system (e.g., RAM for ZFS). If possible, testing each file system in a non-production environment can also help you determine which one best meets your needs.

❌