How to check file permissions in linux
Introduction
In Linux, you can use the ls
command to view file permissions
This tutorial will tell you how to check file permissions
Command Line
View the permissions of all files in the current directory
ls -lah
Parameter Description
parameter | Introduction |
---|---|
ls | List information about the FILEs (the current directory by default). |
-l | use a long listing format. |
-a | do not ignore entries starting with . |
-h | with -l and -s, print sizes like 1K 234M 2G etc. |
operation result
total 0
drwxr-xr-x. 2 root root 32 Sep 6 21:43 .
dr-xr-xr-x. 18 root root 236 Sep 6 21:43 ..
-rw-r--r--. 1 root root 0 Sep 6 21:43 test1
-rw-r--r--. 1 root root 0 Sep 6 21:43 test2
Notice
If you have any questions in use, you can leave a message below, or submit issuse on github ♥