Symlinks or symbolic links are the Linux equivalent of shortcuts in Windows. Symlinks eller symbolske lenker er Linux tilsvarer snarveier i 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 . Opprette symlinks av filer eller mapper kan være ganske nyttig i Linux, som du kan forkorte en bane som / var / www / html / application / konfigurering / images / config.php til noe lettere å huske og håndtere for eksempel / var / www / html / bilde-config.php. Let's see how this can be done. La oss se hvordan dette kan gjøres.
Use the following command to create such a symlink: Bruk følgende kommando for å opprette en slik symlink:
# ln -s /var/www/html/application/configuration/images/config.php /var/www/html/image-config.php # Ln-s / var / www / html / application / konfigurering / images / config.php / var / www / html / bilde-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 . Hva vi har gjort her er at vi har opprettet en symbolsk lenke / var / www / html / bilde-config.php, til / var / www / html / application / konfigurering / images / config.php. You can verify if the symlink was created correctly by running the following command: Du kan kontrollere om symlink ble opprettet på riktig måte ved å kjøre følgende kommando:
# ls -all /var/www/html/image-config.php # Ls-all / var / www / html / bilde-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 april 16:41 image-config.php -> / var / www / html / application / konfigurering / 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. Hvis du administrere en Linux server symlinks kan gjøre livet ditt mye easer og det er noe du bør definitivt gjøre deg kjent med. The easy way to remember the symlink syntax is: Den enkle måten å huske symlink syntaks er:
# ln -s <source> <destination link> # Ln-s <kilde> <destination link>























0 Responses 0 Responses
Stay in touch with the conversation, subscribe to the Hold kontakten med samtalen, abonnere på RSS feed for comments on this post RSS feed for kommentarer til dette innlegget . .