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
కామెంట్లు లేవు:
కామెంట్ను పోస్ట్ చేయండి