Answer the question
In order to leave comments, you need to log in
How to save permissions to a file?
There is a directory with subdirectories and files.
You need to save the rights to the file, so that later, in which case, restore it to its original state.
Can it be done? If so, how?
Answer the question
In order to leave comments, you need to log in
Just make a list. Then you can restore it with a script.
find . -exec stat --format '%a %n' {} \;
find . -exec stat --format '%a %n' {} \; > list_of_files.txt
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question