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...."

DVD CD Disk copy to Hard drive for exclusively files and without folders Bash Shell script Ubuntu Linux

Here rowthu is my account username.
The directory where the disk folder is mounted is /media/rowthu

Before running this programme create a folder OLD_DATA in home directory

Script starts from here

#!/bin/bash

echo "Enter subject code:"
read pname

cd /media/rowthu
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
echo " folder has been successfully created."
echo "Insert Another Disk :"
eject
# end of the program

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