top of page
Writer's pictureBraulio Madrid

Super Tip for your multimedia projects in Linux


pingüino, carpetas, texto y cadenas.
Enlaces simbólicos vs duros

This post will short, but it is something that it will useful if you are a content creator and use files as different templates for create something more elaborated.


A problem that i have from that i am testing with unity projects is that i use several many times the same files and copy these in different projects, a long time these files will be consume hard drive disk space, this problem is common in all types of projects, for example: if you use Fl-Studio and Lmms, the tendency is to copy all instrument samples into system folder of programs. Other example is when you have many emulators of the same videogame console, the tendency is to copy the BIOS and games into root folder of emulators. other example is when you have many image editors how Photoshop, or Gimp, i copy the patterns, templates, palletes etc.


For his i have decided centralize these files in a main folder and protect against write, only make copy of original files for modify etc. But this idea is dumb because not resolve the space in disk problem, so i did an experiment with Fl-Studio and Lmms what will i explain in next.


The hidden power of direct links in Linux.


A direct link is a link to another file located in other place, from that i did use of Microsoft Windows since 2000, never found utility because windows don't recognize links as files, this problem is due to extension is *.lnk that only a text as route of original file.


Since that i use Linux, the direct links now have sense, because they are two types of links:


A symbolic link (#softlink or direct links) as windows, with the advantage that in Linux not exist extension files, allowing the link to act as file itself. Also, it has the advantage that it types of links can connect out of hard disk drive or network folder, pendrive, etc. the unique disadvantage is that, if you delete the original file, it's lost the connection, due that this file aim to route of original file. This links is recognizable for have an arrow icon.


Exist the hard link (#hardlink or physical link) that makes more sense, this hard link is not a link to file route, else a link in the memory position into hard disk drive, your advantage is that, to destroy the original file, the rest of links don't lose the connection and yet can make copy of other link, in other words this link never broke, the disadvantage is that only work into the same partition disk and at first glance they look the same as any file.


So, the idea from library folder, what will be main folder that will contain all original files, distribute soft and hard links to different templates of different programs, thus i can enhance the tools of this programs without space problem and facilitate the migration of original files in other place.


My experiment with Fl-Studio and Lmms it helped me for connect the audio samples of the instruments from base folder of both programs can use the same instruments without space consumption in hard disk.




¿How to make links in Linux?


Open a terminal, write the command #ln, then write the original file and then write the name of destination file.

$ ln archivo_original.txt enlace_duro.txt # Por defecto hace un enlace duro.
$ ln -s archivo_original.txt enlace_suave.txt # Enlace suave con -s

A simple form of create a symbolic link is right clicking on file and send to desktop.


Conclusions.


  • A consideration to keep in mind is that modify a file from a soft or hard link, is modify the original file, thus the changes they will reflected in all links and hence in all projects.

  • If the original files not will modify as case of samples, BIOS, pencils, palletes, shaders and roms of your games, better have files as only read.

  • If the application and links is in the same partition, use hard links, but if these in different partitions or external disk, always use soft links.

  • The main folder must be hidden, that only can be modify by the administrator or owner of files. If are your archives keep into personal documents files.

  • Be very tidy with file names and folder structures, this facilitate found easily, this way will be faster making any project, modify and easy to migrate.


See you next time.


2 views0 comments

Recent Posts

See All

Comments


bottom of page