chmod has a convenient
-R option. If you do
chmod -R 775 [dir], the files in [dir], the child directories, the files in it, etc. will all be
It's convenient, but it's inconvenient because I want to have different permissions for directories and files, but all of them are 775, so this is a command to prevent that.
I think there is the number one situation where you need
For example, let's say you have a directory situation like this.
If you want the directory to be 775 and the file to be 664, hit this.
chmod -R "=r,u+w,g+w,+X" [dir]
** The directory is now 775 and the file is 664 **.
You may not have much chance to do it, but I think that there may be times when you do not have an accident when taking over. Here's how to make it 777/666.
chmod -R "=r,u+w,g+w,o+w,+X" [dir]
** The directory is now 777 and the file is 666 **.
It is when you want to make it so-called normal.
chmod -R "=r,u+w,+X" [dir]
** The directory is now 755 and the file is 644 **.
ls command in the image uses ʻexa
. l -T
is an alias for ʻexa -la -T.
See this article for details on the ʻexa
command that creates colorfulls`. ..
Use exa rather than ls! Introducing modern Linux commands-Qiita https://qiita.com/navitime_tech/items/c249269a3b47666c784b