DEV Community

Euber Alexandre Barbosa
Euber Alexandre Barbosa

Posted on

Dut, yet another simple dotfile manager!

Dotfiles, as implied by its nickname, are files named prepended with a dot, that configure software initial settings and usually resides hidden on $HOME directories.

Users craft their dotfiles through the years with a such a care that them can easily be the most sensible and essential files in their system, version-controlling is a must, of course.

There is even a culture of proudly publicly sharing dotfiles, and that’s a good way to grab some cool snippets.

We all love how frugal and simple to use are the Linux tools as find, grep or ls, so I kept that in mind on cooking up Dut.

Dut creates links of all files in the target directory, perfectly mirroring them in the destination directory, $HOME by default:

dut --from /data/dotfile_folder --create

Of course you can just try it out first:

dut --from /data/dotfile_folder --pretend

To remove all linked files, it goes as:

dut -f /data/dotfile_folder --remove

It goes as easy to set a different destination:

dut -f /data/bin --to ~/.local/bin --create

We don’t want that just every file to be linked, eg: LICENSE. For those files, you can pin out their location by feeding the .dutignore, that follows docker’s .dockerignore.

Conflicting files found at the destination directory are moved up to $HOME/.backup.

And that is it.

For more information, check the README.md in the main repository, or the --help option.

PS: In case you are wondering what’s with all those main.* files, as I pick a new language to learn, Dut is a good initial project as it offers a good set of challenges.

But I reckon that only the Ruby, Guile and PHP versions are fully functional.

With that said, pick your poison! :)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

The discussion has been locked. New comments can't be added.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay