ls display chmod number 1

ls display chmod number

stat -c '%a %n' *

Here is what the above code is Doing:
1. The first line is a shebang. It tells the computer that this file is a Python script.
2. The second line is a comment. It’s ignored by the computer.
3. The third line imports the os module.
4. The fourth line changes the current working directory to the one specified by the user.
5. The fifth line prints the current working directory.
6. The sixth line prints the contents of the current working directory.
7. The seventh line prints the permissions of the files in the current working directory.

Similar Posts