
{"id":15703,"date":"2014-04-07T14:02:04","date_gmt":"2014-04-07T14:02:04","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=15703"},"modified":"2014-04-07T14:02:04","modified_gmt":"2014-04-07T14:02:04","slug":"lsattr-list-file-attributes-on-a-linux-second-extended-file-system","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2014\/04\/07\/lsattr-list-file-attributes-on-a-linux-second-extended-file-system\/","title":{"rendered":"lsattr &#8211; list file attributes on a  ext2fs"},"content":{"rendered":"<h3>\nThe following shows a command line session with lsattr<br \/>\nand stat  commands which helps in listing file attributes.<br \/>\n<\/h3>\n<pre>\n$lsattr -v colors \n1936034688 -------------e-- colors\n$lsattr  colors \n-------------e-- colors\n$ls -l colors \n-rw-r--r-- 1 jeffrin jeffrin 173 Feb 17 21:46 colors\n$stat colors \n  File: \u2018colors\u2019\n  Size: 173       \tBlocks: 8          IO Block: 4096   regular file\nDevice: 801h\/2049d\tInode: 3672604     Links: 1\nAccess: (0644\/-rw-r--r--)  Uid: ( 1000\/ jeffrin)   Gid: ( 1000\/ jeffrin)\nAccess: 2014-03-30 21:42:28.074551288 +0530\nModify: 2014-02-17 21:46:33.476488095 +0530\nChange: 2014-02-17 21:46:33.476488095 +0530\n Birth: -\n$ls -R colors \ncolors\n$lsattr -R colors \n-------------e-- colors\n$lsattr  resume-micro \n-------------e-- resume-micro\n$lsattr  beautifulwork-sorting\/\n-------------e-- beautifulwork-sorting\/gnu-c\n-------------e-- beautifulwork-sorting\/TODO\n-------------e-- beautifulwork-sorting\/README\n-------------e-- beautifulwork-sorting\/bubblesort.php\n-------------e-- beautifulwork-sorting\/php-hypertext-processor\n-------------e-- beautifulwork-sorting\/ruby\n$lsattr  \/bin\/ls\n-------------e-- \/bin\/ls\n$lsattr  \/bin\/date \n-------------e-- \/bin\/date\n$lsattr -v  \/bin\/date \n18446744072723245045 -------------e-- \/bin\/date\n$stat \/bin\/date\n  File: \u2018\/bin\/date\u2019\n  Size: 64168     \tBlocks: 128        IO Block: 4096   regular file\nDevice: 801h\/2049d\tInode: 14418067    Links: 1\nAccess: (0755\/-rwxr-xr-x)  Uid: (    0\/    root)   Gid: (    0\/    root)\nAccess: 2014-04-06 20:48:40.575978902 +0530\nModify: 2013-07-21 03:22:44.000000000 +0530\nChange: 2014-02-17 22:49:42.956708864 +0530\n Birth: -\n$\n\n<\/pre>\n<p><a href=\"http:\/\/unix.stackexchange.com\/questions\/32256\/whats-the-meaning-of-output-of-lsattr\">http:\/\/unix.stackexchange.com\/questions\/32256\/whats-the-meaning-of-output-of-lsattr<\/a><\/p>\n<h3>\nThe &#8216;e&#8217; attribute indicates that the file is using extents for mapping the blocks on  disk.<br \/>\n<\/h3>\n<p><\/p>\n<h3>Showing about hidden directories<\/h3>\n<pre>\n$lsattr -a\n--------------e---- .\/.config\n--------------e---- .\/Public\n--------------e---- .\/.atom\n--------------e---- .\/.profile\n--------------e---- .\/.gitconfig\n--------------e---- .\/.\n--------------e---- .\/Templates\n--------------e---- .\/Firefox_wallpaper.png\n--------------e---- .\/.ICEauthority\n--------------e---- .\/..\n--------------e---- .\/.pki\n--------------e---- .\/beautifulwork\n--------------e---- .\/.gconf\n--------------e---- .\/.local\n--------------e---- .\/.bash_logout\n--------------e---- .\/.mozilla\n--------------e---- .\/.cache\n--------------e---- .\/.gimp-2.8\n--------------e---- .\/.gnupg\n--------------e---- .\/.emacs.d\n--------------e---- .\/Downloads\n--------------e---- .\/.bash_history\n--------------e---- .\/Documents\n--------------e---- .\/.bashrc\n--------------e---- .\/Music\n--------------e---- .\/Videos\n--------------e---- .\/avocado\n--------------e---- .\/.bashrc~\n--------------e---- .\/Pictures\n--------------e---- .\/.ssh\n--------------e---- .\/Desktop\n--------------e---- .\/communications201703-dl.pdf\n$\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following shows a command line session with lsattr and stat commands which helps in listing file attributes. $lsattr -v colors 1936034688 &#8212;&#8212;&#8212;&#8212;-e&#8211; colors $lsattr colors &#8212;&#8212;&#8212;&#8212;-e&#8211; colors $ls -l colors -rw-r&#8211;r&#8211; 1 jeffrin jeffrin 173 Feb 17 21:46 colors $stat colors File: \u2018colors\u2019 Size: 173 Blocks: 8 IO Block: 4096 regular file Device: 801h\/2049d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2014\/04\/07\/lsattr-list-file-attributes-on-a-linux-second-extended-file-system\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;lsattr &#8211; list file attributes on a  ext2fs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83,87],"tags":[435,760],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15703"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=15703"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/15703\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=15703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=15703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=15703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}