cBrandon Community

General Category => Linux Fixes => Topic started by: branx86 on December 28, 2017, 02:50:34 PM

Title: How to Use symlink
Post by: branx86 on December 28, 2017, 02:50:34 PM
Say var is the link your trying to make in another directory use the line below.
Path to where you put var is the original directory(Source).    "var"(Target) is the linked directory in the folder you want ,If the folder is already created it will put the sources path in the folder. You can delete the Target folder and it will create the Target folder name.

ln -s /path/to/where/you/put/var var
ln -s /mnt/bigdrive/Videos /var/www/html/vids    example - do not create the folder just put the folder name at the end of the symlink cmd to create the symlink name ( vids )
ln-s /mnt/bigdrive/Videos vids

Link to a windows share: mount -t cifs //server/share /mnt/abc -o user=user,pass=password,dom=domain
exapmle: mount -t cifs //192.168.2.1/C /mnt/Windows-C -o user=name_of_windows_user_account, pass=Windows_password

unlink [symlink to remove]
rm [symlink name]

Use crontab to start script at starup after reboot https://linuxhint.com/a-beginners-guide-to-crontab-on-centos/