cameron
asked May 15 2017
Answer
Possible by using stat command. Its called statistics command which helps to show you the details of files or directories. And also it will show you the values of permission as 755 as required.
Assume if you have test.txt file and test1 directory with 755 permission,
# stat test.txt
File: `test.txt'
Size: 14 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 422047 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-05-12 15:19:16.783003936 +0530
Modify: 2017-05-12 15:19:14.298004007 +0530
Change: 2017-05-12 15:19:14.298004007 +0530
For directory,
# stat test1
File: `test1'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 802h/2050d Inode: 435519 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2017-05-15 16:57:20.651996368 +0530
Modify: 2016-06-27 20:29:55.469998032 +0530
Change: 2016-06-27 20:29:55.469998032 +0530
jagannatharumugam
asked May 15 2017
edited Oct 05 2018
alternate command for ls to view permission in linux
what is the alternate command to view the permission for the files or directories in linux other than ls - l command. i.e, i need to view the permission with value
Example:
Here, its displayed as drwx but i need 755. Is it possible??