Best way to avoid accidental modification of the file

github logo ・1 min read

Recently I learned very useful tip to avoid accidentally modifying/editing a original file. This will work in all unix like systems including Mac.

The Idea is to just change file permissions to read only using chmod command as below

chmod 444 file_name

or

chmod 400 file_name

twitter logo DISCUSS
Classic DEV Post from Feb 9

A Developers Guide to Getting Fit

How I lost 30 lbs and kept if off while juggling a career as an engineer and developer advocate.

chanduthedev profile image
I am a developer

Sore eyes?

dev.to now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️

(There is also a pink mode)