Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, March 25, 2025

Linux Commands

Below linux command will display the packges installed in linux


dnf list available package_name


dnf list available glibc-devel-* -- This will show package installed on server
ssh-keygen -t -rsa -b 4096 -C "loginemail@domain.com"  -- This Generates ssh key pair

Sunday, March 23, 2025

Linux Simple Shell Script to copy the content into file and replace text

 Below script is the simple bash script to create a dummy file and replace text in the script.



#!bin/bash
cd /tmp
mkdir Test_script
cd Test_script
touch -a -m -t $(date +"%Y%m%d%H%M.%S") dummyfile_$(date +"%Y%m%d%H%M%S%3N").txt
echo "ORACLE_HOME=/opt/sw/oracle/client/home" > dummfile.txt
sed -e 's:/opt/sw/oracle/client/home:/opt/sw/oracle/Oracle19c/client/home:g' dummyfile.txt > dummy2.txt
diff dummyfile.txt dummy2.txt
ls -lrt