Imagine I have a file named "Movie 1" sized 2 gb in the Videos directory, and then i want to organize that file into 2 other files, such as placing "Movie 1" into "Funny Movies" file and "Action Movies" File. Normally i would copy the "movie 1" and paste it into both "funny movies" and "action movies", but wouldn't it use 4gb memory for the same "Movie 1" which is double to its original size of 2gb. Is there someway to refer the file located in videos and refer to it as many times i want instead of making copies and occuping more and more memory of making copies of the same file.

I just started using ubuntu 20.04 as my primary OS.

*Sorry if the question is a little confusing to understand.


This is what links in Linux allow to do. Using links, you can refer to the same data from within different folders.

Linux knows hard links and symbolic links. For practical purposes, you can use symbolic links, which work also across partitions.

Your file manager allows to create symbolic links in different ways.

  • Mouse: Hold ctrl+Shift pressed and drag a file or folder. You see that the cursor adopted a specific shape, hinting you that you will create a link when releasing the mouse button.
  • Keyboard - 1: Press Ctrl+c as you usually would do to copy a selected file or folder. When in the destination folder, hit Ctrl+m to create a symbolic link to the copied item.
  • Keyboard - 2: Select one or more files and folders. Hit Ctrl+Shift+m to create links to all selected items in the same folder. You can then move these links to their final location.
  • Right-click menu: You can include a "Create Link" option in the right-click menu by enabling this in the Preferences.

Hard links are not exposed in the user interface. They allow to create file entries in different folders that are in no way distinguishable from the original file: you cannot tell which one is the link and which one is the original - both entries are fully equivalent. Such links, however, only work within the same file system (partition).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.