Monday, August 29, 2016

momount /dev/cdrom ---> usually you use /mnt/cdrom (create it (use mkdir)if does not exist)

then cp /mnt/cdrom/

cp -r /home/server/folder/test/* /home/server/


$ cp -avr /tmp/conf/ /tmp/backup


$ cp -avr /mnt/cd/ /var/www/html


-a : Preserve the specified attributes such as directory an file mode, ownership, timestamps, if possible additional attributes: context, links, xattr, all.
-v : Explain what is being done.
-r : Copy directories recursively.

=============================================

mkdir -p /mnt/cdrom
mount /dev/cdrom  /mnt/cdrom



=========================================

phpinfo.php in /var/www/html/


=========================================

 rm -rf httpd-2.0.48

 rm -rf "dir name"

=========================================

+++++++++++++++++++++++++++++


USB...

mount /dev/sdb1 /mnt

umount /mnt

sync

And then remove the USB drive.


++++++++++++++++++++


mkdir -p /media/USB


ls /dev/sd (then hit tab)


You should see something like this:

sda sda1 sda2


Next, insert your USB flash drive into the CentOS 7 machine. Type ls /dev/sd (then hit tab). You should see a new sdb and sdb1.


mount -t vfat /dev/sdb1 /media/USB


cp nfs-utils-1.3.0-0.21.el7_2.x86_64.rpm /media/USB/


umount /media/USB


You can now safely eject the USB flash drive from the CentOS 7 machine.


++++++++++++++++++++++++++

NTFS:

yum install epel-release

yum install ntfs-3g

mkdir /mnt/win

mount -t ntfs-3g /dev/sdb1 /mnt/win

umount /mnt/win

**************************

To mount the NTFS partition permanently, add the following line to the /etc/fstab file.
nano /etc/fstab

And add the line:
/dev/sdb1 /mnt/win ntfs-3g defaults 0 0

Again, replace /dev/sdb1 with the device name that matches your setup. Now your Linux system will mount the NTFS drive automatically at boot time.
***************************




CD...


Mount DVD on CentOS
Mount DVD on CentOS

need to mount CD/DVD on CentOS Temporarily or Permanently? Here’s the Process Us Linux Pro’s Follow:

Login to a terminal window as root



from here to ls /dev

as you can see, there’s alot of stuff here (usually it’s /dvd or /sr0) but how can we be sure?

issue the following two commands to find out what Linux Thinks is the CD/DVD ROM:



ls /dev -l | grep dvd

ls /dev -l | grep cd

Linux seems pretty confident that it’s /dev/sr0 (does windows know how to do that?) Your situation may provide different output, use that.

alright, so at this point, we are talking about the following device: /dev/sr0 (always use the full path)

let’s make a directory to mount it to:

mkdir /mnt/DVD



from here, all we have to do is mount the device

to do a temporary mount (one time only until reboot) issue the following Command:



to do a permanent boot, edit /etc/fstab



Like a good Linux Admin, use the # sign, and put a comment in

from here /dev/sr0 will be mounted to /mnt/DVD the filesystem type and  filesystem defaults

Save and quit

issue the almighty Linux Command that Re-Mounts ALL FILESYSTEMS



you should get a notice that it will mount as read-only, that means it mounted, and we can read from it, perfect!

ls /mnt/DVD



as you can see this is an integration services DVD mounted on this CentOS Linux Box.



That’s it!

To Get a Hosted CentOS Linux Server visit www.zwiegnet.comcd/go to get started today!

Tuesday, August 23, 2016

CENTOS kopiranje

mount /dev/cdrom ---> usually you use /mnt/cdrom (create it (use mkdir)if does not exist)

then cp /mnt/cdrom/

cp -r /home/server/folder/test/* /home/server/


$ cp -avr /tmp/conf/ /tmp/backup


-a : Preserve the specified attributes such as directory an file mode, ownership, timestamps, if possible additional attributes: context, links, xattr, all.
-v : Explain what is being done.
-r : Copy directories recursively.

USB...

mount /dev/sdb1 /mnt

umount /mnt

sync

And then remove the USB drive.


++++++++++++++++++++


mkdir -p /media/USB


ls /dev/sd (then hit tab)


You should see something like this:

sda sda1 sda2


Next, insert your USB flash drive into the CentOS 7 machine. Type ls /dev/sd (then hit tab). You should see a new sdb and sdb1.


mount -t vfat /dev/sdb1 /media/USB


cp nfs-utils-1.3.0-0.21.el7_2.x86_64.rpm /media/USB/


umount /media/USB


You can now safely eject the USB flash drive from the CentOS 7 machine.


++++++++++++++++++++++++++

NTFS:

yum install epel-release

yum install ntfs-3g

mkdir /mnt/win

mount -t ntfs-3g /dev/sdb1 /mnt/win

umount /mnt/win

**************************

To mount the NTFS partition permanently, add the following line to the /etc/fstab file.
nano /etc/fstab

And add the line:
/dev/sdb1 /mnt/win ntfs-3g defaults 0 0

Again, replace /dev/sdb1 with the device name that matches your setup. Now your Linux system will mount the NTFS drive automatically at boot time.
***************************