Sunday, 28 December 2014

Script to mount ntfs drives on Red Hat , CentOs And Fedora.

 Script to mount ntfs drives on Red Hat , CentOs   And Fedora.

Writter:Anuj Borah
Email: anujborah@gmail..com



#!/bin/bash
clear
echo -e "Wecome\nWriter:Anuj Borah\nEmail:anujborah1@gmail.com"
sleep 3
if [ $UID -eq 0 ]
then
rpm -q gcc &&  echo "OK Nice" || echo "gcc not installed u must install  gcc type 'yum install gcc' then try again"
sleep 3
wget "tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz"
clear
echo "Download in progress , wait "
sleep 3
tar -zxvf ntfs-3g_ntfsprogs-2014.2.15.tgz
cd ntfs-3g_ntfsprogs-2014.2.15
clear
chmod +x *
clear
./configure
make
make install
clear
echo "Looks like every thing gone fine.Now i will check it"
firefox borahshell.blogsopt.in
sleep 3
clear
echo "give me the drive to mount to your system"
read p
clear
echo "Given drive $p and the drive will be mounted to /media/usb"
sleep 3
clear
mkdir /media/usb >/dev/null
mount mount -t ntfs-3g $p  /media/usb
clear
echo "Congrats all done . Now u can access ntfs drive by typing cd /media/usb"
else
echo "&&&&&&This Script will run as root only ,  login as root and try $0  again. &&&&&&"
fi


No comments:

Post a Comment

Popular Posts