Symlinks or symbolic links are the Linux equivalent of shortcuts in Windows. Символічні або символічні посилання є еквівалентними Linux ярликів у Windows. Creating symlinks of files or folders can be quite useful in Linux, as you can shorten a path such as /var/www/html/application/configuration/images/config.php to something easier to remember and manage such as /var/www/html/image-config.php . Створення символічні файлів або папок може бути дуже корисною в Linux, як можна скоротити шлях, такий як / VAR / WWW / HTML / Застосування / Конфігурація / Images / config.php до чогось легше запам'ятати і використовувати такі як / VAR / WWW / HTML / фото-config.php. Let's see how this can be done. Давайте подивимося, як це можна зробити.
Use the following command to create such a symlink: Використовуйте наступну команду, щоб створити таку символічну посилання:
# ln -s /var/www/html/application/configuration/images/config.php /var/www/html/image-config.php # В-S / VAR / WWW / HTML / Застосування / Конфігурація / Images / config.php / VAR / WWW / HTML / фото-config.php
What we have done here is that we have created a symbolic link, /var/www/html/image-config.php , to /var/www/html/application/configuration/images/config.php . Те, що ми зробили тут є те, що ми створили символічну посилання / VAR / WWW / HTML / фото-config.php, в / VAR / WWW / HTML / Застосування / Конфігурація / Images / config.php. You can verify if the symlink was created correctly by running the following command: Ви можете перевірити Якщо посилання була створена Правильно виконавши наступну команду:
# ls -all /var/www/html/image-config.php # LS-Всі / VAR / WWW / HTML / фото-config.php
lrwxrwxrwx 1 calvin calvin 37 Apr 29 16:41 image-config.php -> /var/www/html/application/configuration/images/config.php lrwxrwxrwx 1 Calvin Calvin 37 29 квітня 16:41 зображень-config.php -> / VAR / WWW / HTML / Застосування / Конфігурація / Images / config.php
If you are administering a Linux server symlinks can make your life a lot easer and it is something you should definitely familiarize yourself with. Якщо ви керуючий символічні Linux-сервер може зробити ваше життя набагато Допоміжна свердловина, і це щось вам обов'язково треба ознайомитися с. The easy way to remember the symlink syntax is: Легкий спосіб запам'ятати символічна зв'язок синтаксис:
# ln -s <source> <destination link> # В-S <source> <destination link>























{ 0 comments… (0 коментарів ... add one now Додати одну картину } )
Leave a Comment Залишити коментар