How to create a symlink (shortcut) in Linux Як створити символічне посилання (ярлик) в Linux

by Sukrit Dhandhania on May 14, 2009 За Sukrit Dhandhania по 14 травня 2009

Linux

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>

Related Posts: Схожі повідомлення:
  • How to use your Nokia N95 as a wireless Webcam Як користуватися телефоном Nokia N95 як бездротової веб-камера
  • How to save the output of a Linux command to a file Як зберегти вивід команди Linux в файл
  • How to encrypt your Linux backups Як шифрування резервних копій Linux
  • How to block an IP address in IPTables in Linux Як заблокувати адреса в IPTables в Linux
  • How to prevent your SSH session from disconnecting in Linux Як запобігти ваш SSH сесію з відключенням в Linux
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Отримати довідки Прості підручників, як це у вашому поштовому ящику щодня - безкоштовно! Just enter your email address below: Просто введіть свою адресу електронної пошти нижче:

    You can always opt out of this email subscription at any time. Ви завжди можете відмовитися від підписки це повідомлення в будь-який час.

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

    Leave a Comment Залишити коментар

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Ви можете використовувати ці HTML теги і атрибути: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q Cite=""> <strike> <strong>