May 15

Linux: Moving directories and files that have softlinks to another drive

In general softlinks cannot be moved as it will break the link.

Softlinked files and directories can be moved as long as their links are all within sub directories of the main folder.
The one caveat is that you need to move them to a file system that supports links.

As an example I wanted to make a quick copy of ubuntu-builder.
My source drive was EXT4.  I then created a sufficient sized EXT2 partiotion on a USB drive.

I copied the main ubuntu-builder folder and all of it’s subordinate directories and files to the  to the targeted USB drive’s EXT2 partition.
All links were maintained.



Copyright 2021. All rights reserved.

Posted May 15, 2013 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B