Translate

Use categories on the left bar

For orientation in my website, please use a left menu bar with category/subcategory list

Linux - commands

Linux - commands:

  1. Create a secondary disk on running system
  2. Firstly you need a run scanning:
    for i in $(ls /sys/class/scsi_host/); do echo "- - -" > /sys/class/scsi_host/$i/scan; done
    for i in $(ls /sys/class/scsi_disk/); do echo "- - -" > /sys/class/scsi_disk/$i/device/rescan; done
    
    lsblk
    mkfs.xfs /dev/sdb
    ls -l /dev/disk/by-uuid/
    blkid /dev/sdb
    cp /etc/fstab /etc/fstab.bak
    blkid /dev/sdb >> /etc/fstab
    
    vi /etc/fstab
    
    UUID=ef867711-7492-48df-9ffe-0cc1d456533b /export       xfs defaults    0 1
    
    mount -a

  3. Incrase existing partition.
  4. for i in $(ls /sys/class/scsi_host/); do echo "- - -" > /sys/class/scsi_host/$i/scan; done
    for i in $(ls /sys/class/scsi_disk/); do echo "- - -" > /sys/class/scsi_disk/$i/device/rescan; done
    xfs_growfs /dev/sdc1

  5. Check version of installed package
  6. rpm -qa |grep php
    rpm -e php-gd-5.4.16-46.el7.x86_64 php-ldap-5.4.16-46.el7.x86_64

  7. To create a symlink at /usr/bin/bar which references the original file /opt/foo, use:
  8. ln -s /opt/foo /usr/bin/bar
    You would need to apply the above command as root (i.e. with sudo).
  9. NFS storage

  10. Rename network interface
  11. /sbin/ip link set net0 down
    /sbin/ip link set net0 name eth0
    /sbin/ip link set eth0 up





Mount Linux CIFS share

Mount CIFS with the default local filesystem permissions:
# mkdir /mnt/cifs
# mount -t cifs //server-name/share-name /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
# mount -t cifs //192.168.101.100/sales /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft

OR
# mount.cifs //192.168.101.100/sales /mnt/cifs -o username=shareuser,password=sharepassword,domain=nixcraft
     

No comments:

Post a Comment