About this blog

I feel this blog as a reflection of my thoughts to myself , and sometimes as a public diary, and the is my only friend to share my thoughts who says never a "oh no! ,you shouldn't....That is boring...."

Updated copy disk files Linux bash shell script

#!/bin/bash

echo "Enter subject code:"
read pname

read -a arrayy <<< `cat /proc/mounts |grep sr0`
echo The files are being copied from: ${arrayy[1]}
cd ${arrayy[1]}

rm -r ~/tempsource
mkdir ~/tempsource

for jj in `find . -type f`
do
cp $jj ~/tempsource
done


chmod a+rwx ~/tempsource/*


cd ~/OLD_DATA
mkdir $pname
mv ~/tempsource/* $pname
echo $pname ": folder has been successfully created."

notify-send "Disk copy task Completed:"

echo "Insert Another Disk :"
eject

కామెంట్‌లు లేవు: