[LINUX] About specific events of r: read permission, w: write permission, x: execute permission of the execution result of the ls command

You can check the file permissions in the execution result of the ls command.

However, even if it was said that r (4): read authority, w (2): write authority, and x (1): execute authority, I could not have a concrete image among beginners.

Write notes there

Terminal


????????MacBook-ea:qwert hogehoge$ ls -l
total 4
drwxrwxrwx   4 ????????  staff  128 11  2 12:51 css
drwxrwxrwx  13 ????????  staff  416 11  2 12:51 images
-rwxrwxrwx@  1 ????????  staff  866 11  2 12:51 index.html
drwxrwxrwx   3 ????????  staff   96 11  2 12:51 js

■ r (4): Read permission The contents can be displayed with the cat command. If you do not have permission, you can not see the contents with cat, and even if you open it with vi, you can not see it with a blank sheet

■ w (2): Write permission Editable with vi. If you do not have permission, you can not see it with a blank sheet even if you open it with vi or vi

■ x (1): Execution permission Rename and move with Mv, and download from FTP software such as WinSCP

[Reference] http://ilovelovemoney.blog.fc2.com/blog-entry-112.html

Recommended Posts

About specific events of r: read permission, w: write permission, x: execute permission of the execution result of the ls command
How to pass the execution result of a shell command in a list in Python