Translate rwx Permission in to Octal Format in Linux- (Chmod command user)


This command provides the list of files with the permission

$ stat -c ‘%n %a’ *

%n means filename and %a means octal form of permissions

 

Output:

<filename> 755

<filename> 777

 

You can use this command also to display regular form of permssions.

$ stat -c ‘%n %a’ *

Output

<filename>  -r-rwxr-xr-x

<filename> -rw-r–r–

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s