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