PythonSed icon indicating copy to clipboard operation
PythonSed copied to clipboard

Applying in place changes file's permissions

Open me-kell opened this issue 6 months ago • 0 comments

Create somefile and get permissions (644)

$ echo "x" > somefile
$ stat -c "%a %n" somefile
644 somefile

run PythonSed in place and get permissions:

$ python3 -c "from PythonSed import Sed; sed = Sed(in_place=''); sed.load_string('s/x/y/'); sed.apply('somefile')"
$ stat -c "%a %n" somefile
600 somefile

Permissions are changed to 600

me-kell avatar Jun 10 '25 05:06 me-kell