DEV Community

chanduthedev
chanduthedev

Posted on

1 1

Best way to avoid accidental modification of the file

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

Enter fullscreen mode Exit fullscreen mode

or


>chmod 400 file_name

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay