Skip to content Skip to content


How to create a symlink (shortcut) in Linux Kā izveidot saitēt (shortcut) in Linux

Linux

Symlinks or symbolic links are the Linux equivalent of shortcuts in Windows. Symlinks vai simboliskas saites ir Linux ekvivalentu īsceļu 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 . Radīt symlinks failus vai mapes var būt visai noderīga, Linux, kā jūs varat saīsināt ceļu, piemēram, / var / www / html / application / konfigurācijas / images / config.php kaut ko vieglāk atcerēties un vadīt, piemēram, / var / www html / image-config.php. Let's see how this can be done. Let's redzēt, kā to var izdarīt.

Use the following command to create such a symlink: Izmantojiet komandu, lai radītu šādu saitēt:

# ln -s /var/www/html/application/configuration/images/config.php /var/www/html/image-config.php # Ln-s / var / www / html / application / konfigurācijas / images / config.php / var / www / html / image-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 . Ko mēs esam izdarījuši šeit ir tas, ka mēs esam radījuši simboliska saite, / var / www / html / foto-config.php, uz / var / www / html / application / konfigurācijas / images / config.php. You can verify if the symlink was created correctly by running the following command: Jūs varat pārbaudīt, vai saitēt tika izveidota pareizi darboties šādu komandu:

# ls -all /var/www/html/image-config.php # Ls-visu / var / www / html / image-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 aprīlis 16:41 attēlu config.php -> / var / www / html / application / konfigurācijas / 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. Ja jūs esat lieto Linux serveri symlinks var padarīt Jūsu dzīvi daudz easer un tas ir kaut kas jums noteikti vajadzētu iepazīties ar. The easy way to remember the symlink syntax is: Viegls veids, kā atcerēties saitēt sintakse ir:

# ln -s <source> <destination link> # Ln-s <source> <destination link>

Posted in Iesūtīts Linux Linux . .

Related Posts: Related Posts:

How to save the output of a Linux command to a file Kā lai saglabātu jaudu Linux komandu failu
How to encrypt your Linux backups Kā lai šifrētu savu Linux backups
How to block an IP address in IPTables in Linux Kā nobloķēt IP adresi iptables Linux
How to use your Nokia N95 as a wireless Webcam Kā lietot savu Nokia N95 kā bezvadu Webcam
How to prevent your SSH session from disconnecting in Linux Kā novērst jūsu SSH sesiju atvienot Linux

0 Responses 0 Atbildes

Stay in touch with the conversation, subscribe to the Uzturēt kontaktus ar sarunu, abonēt RSS feed for comments on this post RSS barību komentārus par šo ziņu . .



Some HTML is OK Daži HTML ir OK

or, reply to this post via vai, atbildot uz šo ziņu izmantojot trackback Trackback . .