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>























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 . .